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"` // Mesh holds all cascading zippers config. the map-key is mesh name. Mesh map[string]Mesh `yaml:"mesh"` // Bridge is the bridge config. Bridge map[string]any `yaml:"bridge"` }
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 Function ¶ added in v1.12.2
type Function struct { // Name is the name of StreamFunction. Name string `yaml:"name"` }
Function represents a yomo stream function.
type Mesh ¶ added in v1.17.2
type Mesh struct { // Host is the host of mesh zipper. Host string `yaml:"host"` // Port is the port of mesh zipper. Port int `yaml:"port"` // Credential is the credential when connect to mesh zipper. // It is in the format of 'authType:authPayload', separated by a colon. // If Credential is empty, it represents that mesh will not authenticate the current Zipper. Credential string `yaml:"credential"` }
Mesh describes a cascading zipper config.
Click to show internal directories.
Click to hide internal directories.