# SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
# SPDX-License-Identifier: Apache-2.0

nodes = {
    redis_node = {
        type = "redis",

        # Only valid for mode = 'channel' and 'key'
        # With mode = 'hash' we will use a simple human readable format
        format = "json",

        # The Redis key to be used for mode = 'key' or 'hash' (default is the node name)
        key = "my_key"

        # The Redis channel tp be used for mode = 'channel' (default is the node name)
        channel = "my_channel"

        # One of:
        # - 'channel' (publish/subscribe)
        # - 'key'     (set/get)
        # - 'hash'    (hmset/hgetall)
        mode = "key",

        # Whether or not to use Redis keyspace event notifications to get notified about updates
        notify = false

        # The polling rate when notify = false
        rate = 1.0

        # The Redis connection URI
        uri = "tcp://localhost:6379/0",

        # Alternatively the connection options can be specified independently
        # host = "localhost"

        # Note: options here will overwrite the respective part of the URI if both are given
        # port = 6379
        # db = 0

        # path = "/var/run/redis.sock"

        # user = "guest",
        # password = "guest"

        # ssl = {
        # enabled = true
        # cacert = "/etc/ssl/certs/ca-certificates.crt",
        # cacertdir = "/etc/ssl/certs"
        # cert = "./my_cert.crt",
        # key = "./my_key.key"
        # }
    }
}