Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequestHandler ¶
func NewRequestHandler(publisher funcie.Publisher) transports.MessageHandler
NewRequestHandler creates a new RequestHandler.
Types ¶
type Config ¶
type Config struct { // RedisAddress is the address of the Redis server. RedisAddress string `json:"redisAddress"` // ListenAddress is the address to listen on. ListenAddress string `json:"listenAddress"` // RequestTtl indicates the time to live for a request. RequestTtl time.Duration `json:"requestTtl"` // RequestChannel is the channel to publish requests to. RequestChannel string `json:"requestChannel"` // ResponseChannel is the channel to listen for responses on. ResponseKeyPrefix string `json:"responseKeyPrefix"` }
Config allows the configuration of the Bastion.
func NewConfigFromEnvironment ¶
func NewConfigFromEnvironment() *Config
NewConfigFromEnvironment creates a new Config from environment variables. If any required environment variables are not set, this function will panic with a user-friendly error message. The following environment variables are used:
FUNCIE_REDIS_ADDRESS (required) FUNCIE_LISTEN_ADDRESS (required) FUNCIE_REQUEST_TTL (optional; defaults to 15 minutes; values are parsed using time.ParseDuration) FUNCIE_REQUEST_CHANNEL (optional; defaults to "funcie:requests") FUNCIE_RESPONSE_KEY_PREFIX (optional; defaults to "funcie:response:")
Click to show internal directories.
Click to hide internal directories.