Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalYAML ¶
MarshalYAML marshals a config set to yaml.
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config implements JSON unmarshaling and marshaling logic.
func NewConfigWithJSON ¶ added in v0.8.7
NewConfigWithJSON returns a Config object for JSON parsing.
func (*Config) MarshalJSON ¶
MarshalJSON marshals a controller config JSON blob.
func (*Config) UnmarshalJSON ¶
UnmarshalJSON unmarshals a controller config JSON blob pushing the data into the pending parse buffer.
type ConfigSet ¶
type ConfigSet map[string]*ControllerConfig
ConfigSet implements the JSON unmarshaling logic for a configset.
func NewConfigSet ¶
NewConfigSet constructs a new ConfigSet.
type ControllerConfig ¶
type ControllerConfig struct { // Rev is the revision number. Rev uint64 `json:"rev,omitempty"` // Id is the configuration ID. Id string `json:"id"` // Config is the configuration object. Config *Config `json:"config,omitempty"` }
ControllerConfig implements the JSON unmarshaling logic.
func NewControllerConfig ¶
func NewControllerConfig(c configset.ControllerConfig) *ControllerConfig
NewControllerConfig builds a new controller config.
func UnmarshalControllerConfigYAML ¶ added in v0.15.0
func UnmarshalControllerConfigYAML(data []byte) (*ControllerConfig, error)
UnmarshalControllerConfigYAML unmarshals a yaml to a ControllerConfig.
func (*ControllerConfig) GetRev ¶ added in v0.26.0
func (c *ControllerConfig) GetRev() uint64
GetRev returns the revision.
func (*ControllerConfig) Resolve ¶
func (c *ControllerConfig) Resolve(ctx context.Context, b bus.Bus) (configset.ControllerConfig, error)
Resolve resolves the config into a configset.ControllerConfig