Name

inspect — Introspection command for Rivet configuration

Synopsis

::rivet::inspect ?configuration_section? ?configuration_parameter?

Description

::rivet::inspect provides introspection into the running configuration of Rivet. Rivet's debug command uses it in order to gain insight into the configuration, but it can be used in any script.

::rivet::inspect can be called in 5 different forms

  • With no argument the command returns a dictionary with 3 keys: server, dir, user. Each key is associated to a subdictionary carrying the configuration as set for that request. In this form the command is meant to support compatibility with previous versions of mod_rivet where three global arrays were created to be internally used by command ::rivet::debug.
  • With the ?-all? argument a dictionary carrying the whole configuration for that specific request is returned. If a configuration parameter is not set it's given the string undefined. Returned configuration paramenters are
        "ServerInitScript",
        "GlobalInitScript",
        "ChildInitScript",
        "ChildExitScript",
        "BeforeScript",
        "AfterScript",
        "AfterEveryScript",
        "AbortScript",
        "ErrorScript",
        "UploadMaxSize",
        "UploadDirectory",
        "UploadFilesToVar",
        "SeparateVirtualInterps",
        "HonorHeaderOnlyRequests"
  • With one of the Rivet configuration directives listed above as single argument ::rivet::inspect returns the current value in the configuration record.
  • Passing the argument "script" ::rivet::inspect returns a path to the current script in a similar way core command [info script] does. The basic difference is that the core command returns a relative path with respect to the current working directory, whereas mod_rivet's command returns the full path.
  • Passing the argument "server" ::rivet::inspect returns a dictionary with these fields taken from the server record descriptor
    • hostname: The server hostname
    • admin: The admin's contact information
    • errorlog: The name of the error log
    • server_path: Pathname for ServerPath