Documentation ¶
Index ¶
- Variables
- func MergeConfigSetMaps(out ConfigSetMap, sets ...ConfigSetMap)
- type ConfigSet
- func (m *ConfigSet) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ConfigSet) CloneVT() *ConfigSet
- func (this *ConfigSet) EqualMessageVT(thatMsg any) bool
- func (this *ConfigSet) EqualVT(that *ConfigSet) bool
- func (x *ConfigSet) GetConfigs() map[string]*ControllerConfig
- func (x *ConfigSet) MarshalJSON() ([]byte, error)
- func (x *ConfigSet) MarshalProtoJSON(s *json.MarshalState)
- func (x *ConfigSet) MarshalProtoText() string
- func (m *ConfigSet) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ConfigSet) MarshalToVT(dAtA []byte) (int, error)
- func (m *ConfigSet) MarshalVT() (dAtA []byte, err error)
- func (*ConfigSet) ProtoMessage()
- func (x *ConfigSet) Reset()
- func (c *ConfigSet) Resolve(ctx context.Context, b bus.Bus) (configset.ConfigSet, error)
- func (m *ConfigSet) SizeVT() (n int)
- func (x *ConfigSet) String() string
- func (x *ConfigSet) UnmarshalJSON(b []byte) error
- func (x *ConfigSet) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ConfigSet) UnmarshalVT(dAtA []byte) error
- func (c *ConfigSet) Validate() error
- type ConfigSetMap
- type ConfigSet_ConfigsEntry
- func (x *ConfigSet_ConfigsEntry) GetKey() string
- func (x *ConfigSet_ConfigsEntry) GetValue() *ControllerConfig
- func (x *ConfigSet_ConfigsEntry) MarshalJSON() ([]byte, error)
- func (x *ConfigSet_ConfigsEntry) MarshalProtoJSON(s *json.MarshalState)
- func (x *ConfigSet_ConfigsEntry) MarshalProtoText() string
- func (*ConfigSet_ConfigsEntry) ProtoMessage()
- func (x *ConfigSet_ConfigsEntry) Reset()
- func (x *ConfigSet_ConfigsEntry) String() string
- func (x *ConfigSet_ConfigsEntry) UnmarshalJSON(b []byte) error
- func (x *ConfigSet_ConfigsEntry) UnmarshalProtoJSON(s *json.UnmarshalState)
- type ControllerConfig
- func (m *ControllerConfig) CloneMessageVT() protobuf_go_lite.CloneMessage
- func (m *ControllerConfig) CloneVT() *ControllerConfig
- func (this *ControllerConfig) EqualMessageVT(thatMsg any) bool
- func (this *ControllerConfig) EqualVT(that *ControllerConfig) bool
- func (x *ControllerConfig) GetConfig() []byte
- func (x *ControllerConfig) GetId() string
- func (x *ControllerConfig) GetRev() uint64
- func (c *ControllerConfig) MarshalJSON() ([]byte, error)
- func (c *ControllerConfig) MarshalProtoJSON(s *json.MarshalState)
- func (x *ControllerConfig) MarshalProtoText() string
- func (m *ControllerConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)
- func (m *ControllerConfig) MarshalToVT(dAtA []byte) (int, error)
- func (m *ControllerConfig) MarshalVT() (dAtA []byte, err error)
- func (*ControllerConfig) ProtoMessage()
- func (x *ControllerConfig) Reset()
- func (c *ControllerConfig) Resolve(ctx context.Context, b bus.Bus) (configset.ControllerConfig, error)
- func (m *ControllerConfig) SizeVT() (n int)
- func (x *ControllerConfig) String() string
- func (c *ControllerConfig) UnmarshalJSON(b []byte) error
- func (c *ControllerConfig) UnmarshalProtoJSON(s *json.UnmarshalState)
- func (m *ControllerConfig) UnmarshalVT(dAtA []byte) error
- func (c *ControllerConfig) Validate() error
Constants ¶
This section is empty.
Variables ¶
var ErrControllerConfigIdEmpty = errors.New("controller config id empty")
ErrControllerConfigIdEmpty is returned if the controller config id was empty.
Functions ¶
func MergeConfigSetMaps ¶ added in v0.15.5
func MergeConfigSetMaps(out ConfigSetMap, sets ...ConfigSetMap)
MergeConfigSetMaps merges multiple config set maps to one ConfigSetMap.
Types ¶
type ConfigSet ¶
type ConfigSet struct { // Configs contains the controller configurations. Configs map[string]*ControllerConfig `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
ConfigSet contains a configuration set.
func MergeConfigSets ¶ added in v0.15.5
MergeConfigSets merges multiple config sets maps to one ConfigSet.
func NewConfigSet ¶
NewConfigSet constructs a configset from a configset.ConfigSet.
func (*ConfigSet) CloneMessageVT ¶ added in v0.23.6
func (m *ConfigSet) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ConfigSet) EqualMessageVT ¶ added in v0.23.6
func (*ConfigSet) GetConfigs ¶ added in v0.41.0
func (x *ConfigSet) GetConfigs() map[string]*ControllerConfig
func (*ConfigSet) MarshalJSON ¶ added in v0.41.0
MarshalJSON marshals the ConfigSet to JSON.
func (*ConfigSet) MarshalProtoJSON ¶ added in v0.41.0
func (x *ConfigSet) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ConfigSet message to JSON.
func (*ConfigSet) MarshalProtoText ¶ added in v0.42.0
func (*ConfigSet) MarshalToSizedBufferVT ¶ added in v0.10.0
func (*ConfigSet) MarshalToVT ¶ added in v0.10.0
func (*ConfigSet) ProtoMessage ¶
func (*ConfigSet) ProtoMessage()
func (*ConfigSet) UnmarshalJSON ¶ added in v0.41.0
UnmarshalJSON unmarshals the ConfigSet from JSON.
func (*ConfigSet) UnmarshalProtoJSON ¶ added in v0.41.0
func (x *ConfigSet) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ConfigSet message from JSON.
func (*ConfigSet) UnmarshalVT ¶ added in v0.10.0
type ConfigSetMap ¶
type ConfigSetMap map[string]*ControllerConfig
ConfigSetMap implements the controllerbus.ConfigSet as protobuf. Cast the proto type to this type.
func NewConfigSetMap ¶
func NewConfigSetMap(c configset.ConfigSet, useJson bool) (ConfigSetMap, error)
NewConfigSetMap packs a configset to a proto object.
func (ConfigSetMap) ApplyConfig ¶ added in v0.31.1
func (c ConfigSetMap) ApplyConfig(id string, conf config.Config, rev uint64, useJson bool) (*ControllerConfig, error)
ApplyConfig applies a config to the ConfigSetMap.
func (ConfigSetMap) Validate ¶ added in v0.15.1
func (c ConfigSetMap) Validate() error
Validate validates the ConfigSetMap.
type ConfigSet_ConfigsEntry ¶ added in v0.41.0
type ConfigSet_ConfigsEntry struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value *ControllerConfig `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*ConfigSet_ConfigsEntry) GetKey ¶ added in v0.41.0
func (x *ConfigSet_ConfigsEntry) GetKey() string
func (*ConfigSet_ConfigsEntry) GetValue ¶ added in v0.41.0
func (x *ConfigSet_ConfigsEntry) GetValue() *ControllerConfig
func (*ConfigSet_ConfigsEntry) MarshalJSON ¶ added in v0.41.0
func (x *ConfigSet_ConfigsEntry) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ConfigSet_ConfigsEntry to JSON.
func (*ConfigSet_ConfigsEntry) MarshalProtoJSON ¶ added in v0.41.0
func (x *ConfigSet_ConfigsEntry) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ConfigSet_ConfigsEntry message to JSON.
func (*ConfigSet_ConfigsEntry) MarshalProtoText ¶ added in v0.42.0
func (x *ConfigSet_ConfigsEntry) MarshalProtoText() string
func (*ConfigSet_ConfigsEntry) ProtoMessage ¶ added in v0.41.0
func (*ConfigSet_ConfigsEntry) ProtoMessage()
func (*ConfigSet_ConfigsEntry) Reset ¶ added in v0.41.0
func (x *ConfigSet_ConfigsEntry) Reset()
func (*ConfigSet_ConfigsEntry) String ¶ added in v0.42.0
func (x *ConfigSet_ConfigsEntry) String() string
func (*ConfigSet_ConfigsEntry) UnmarshalJSON ¶ added in v0.41.0
func (x *ConfigSet_ConfigsEntry) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ConfigSet_ConfigsEntry from JSON.
func (*ConfigSet_ConfigsEntry) UnmarshalProtoJSON ¶ added in v0.41.0
func (x *ConfigSet_ConfigsEntry) UnmarshalProtoJSON(s *json.UnmarshalState)
UnmarshalProtoJSON unmarshals the ConfigSet_ConfigsEntry message from JSON.
type ControllerConfig ¶
type ControllerConfig struct { // Id is the config ID. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Rev is the revision number of the configuration. Rev uint64 `protobuf:"varint,2,opt,name=rev,proto3" json:"rev,omitempty"` // Config is the configuration object. // Proto supports: protobuf (binary) and json (starting with {). // Json supports: protobuf (base64) and json (inline object). Config []byte `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"` // contains filtered or unexported fields }
ControllerConfig contains a controller configuration.
protobuf-go-lite:disable-json
func NewControllerConfig ¶
func NewControllerConfig(c configset.ControllerConfig, useJson bool) (*ControllerConfig, error)
NewControllerConfig constructs a new controller config.
func (*ControllerConfig) CloneMessageVT ¶ added in v0.23.6
func (m *ControllerConfig) CloneMessageVT() protobuf_go_lite.CloneMessage
func (*ControllerConfig) CloneVT ¶ added in v0.12.3
func (m *ControllerConfig) CloneVT() *ControllerConfig
func (*ControllerConfig) EqualMessageVT ¶ added in v0.23.6
func (this *ControllerConfig) EqualMessageVT(thatMsg any) bool
func (*ControllerConfig) EqualVT ¶ added in v0.10.0
func (this *ControllerConfig) EqualVT(that *ControllerConfig) bool
func (*ControllerConfig) GetConfig ¶
func (x *ControllerConfig) GetConfig() []byte
func (*ControllerConfig) GetId ¶
func (x *ControllerConfig) GetId() string
func (*ControllerConfig) GetRev ¶ added in v0.26.0
func (x *ControllerConfig) GetRev() uint64
func (*ControllerConfig) MarshalJSON ¶ added in v0.24.0
func (c *ControllerConfig) MarshalJSON() ([]byte, error)
MarshalJSON marshals the ControllerConfig to JSON.
func (*ControllerConfig) MarshalProtoJSON ¶ added in v0.41.0
func (c *ControllerConfig) MarshalProtoJSON(s *json.MarshalState)
MarshalProtoJSON marshals the ControllerConfig message to JSON.
func (*ControllerConfig) MarshalProtoText ¶ added in v0.42.0
func (x *ControllerConfig) MarshalProtoText() string
func (*ControllerConfig) MarshalToSizedBufferVT ¶ added in v0.10.0
func (m *ControllerConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error)
func (*ControllerConfig) MarshalToVT ¶ added in v0.10.0
func (m *ControllerConfig) MarshalToVT(dAtA []byte) (int, error)
func (*ControllerConfig) MarshalVT ¶ added in v0.10.0
func (m *ControllerConfig) MarshalVT() (dAtA []byte, err error)
func (*ControllerConfig) ProtoMessage ¶
func (*ControllerConfig) ProtoMessage()
func (*ControllerConfig) Reset ¶
func (x *ControllerConfig) Reset()
func (*ControllerConfig) Resolve ¶
func (c *ControllerConfig) Resolve(ctx context.Context, b bus.Bus) (configset.ControllerConfig, error)
Resolve resolves the config into a configset.ControllerConfig
func (*ControllerConfig) SizeVT ¶ added in v0.10.0
func (m *ControllerConfig) SizeVT() (n int)
func (*ControllerConfig) String ¶
func (x *ControllerConfig) String() string
func (*ControllerConfig) UnmarshalJSON ¶ added in v0.15.1
func (c *ControllerConfig) UnmarshalJSON(b []byte) error
UnmarshalJSON unmarshals the ControllerConfig from JSON.
func (*ControllerConfig) UnmarshalProtoJSON ¶ added in v0.41.0
func (c *ControllerConfig) UnmarshalProtoJSON(s *json.UnmarshalState)
func (*ControllerConfig) UnmarshalVT ¶ added in v0.10.0
func (m *ControllerConfig) UnmarshalVT(dAtA []byte) error
func (*ControllerConfig) Validate ¶
func (c *ControllerConfig) Validate() error
Validate performs cursory validation of the controller config.