Documentation
¶
Overview ¶
Package config provides configurations for cascading zippers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConfigExt = errors.New(`yomo: the extension of config is incorrect, it should be ".yaml|.yml"`)
ErrConfigExt represents the extension of config file is incorrect.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v1.12.2
type Config struct { // Name represents the name of the zipper. Name string `yaml:"name"` // Host represents the listening host of the zipper. Host string `yaml:"host"` // Port represents the listening port of the zipper. Port int `yaml:"port"` // Auth is the way for the source or SFN to be authenticated by the zipper. // The token typed auth has two key-value pairs associated with it: // a `type:token` key-value pair and a `token:<CREDENTIAL>` key-value pair. Auth map[string]string `yaml:"auth"` // Functions represents the stream functions that zipper allowed to connect. Functions []Function `yaml:"functions"` // Downstreams holds cascading zippers config. the map-key is downstream name. Downstreams map[string]Downstream `yaml:"downstreams"` }
Config represents a yomo config.
func ParseConfigFile ¶ added in v1.12.2
ParseConfigFile parses the config from configPath. The zipper will bootstrap from this config.
type Downstream ¶ added in v1.12.2
type Downstream struct { // Host is the host of downstream zipper. Host string `yaml:"host"` // Port is the port of downstream zipper. Port int `yaml:"port"` // Credential is the credential when connect to downstream zipper. // It is in the format of 'authType:authPayload', separated by a colon. // If Credential is empty, it represents that downstream will not authenticate the current Zipper. Credential string `yaml:"credential"` }
Downstream describes a cascading zipper config.
Click to show internal directories.
Click to hide internal directories.