> os_daemons have limited ability to request information from couch and
> they initiate.
> "Restart me if configuration section <section> changes" is one (the
> only?) example.

There are three types of requests an os_daemon can make: get config
variable, register to be restarted on config change, or log message.

The formats for each are:

Get config:

    Req: ["get", Section]
    Res: {"key1": "value", "key2": "value2"}

    Req: ["get", Section, Key]
    Res: "value"

Register for restart:

    Req: ["register", Section]
    # process is killed when Section changes.

    Req: ["register", Section, Key]
    # process is killed when Section.Key changes

Log

    Req: ["log", Message]
    # Message is logged at INFO level

    Req: ["log", Message, Opts]
    # Opts current supports a level key like:
    # {"level": "error"} and then we log at that level
    # log message is logged at specified level, or
    # at info level if the level is invalid.

Reply via email to