configset_proto

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrControllerConfigIdEmpty is returned if the controller config id was empty.
	ErrControllerConfigIdEmpty = errors.New("controller config id empty")
)

Functions

This section is empty.

Types

type ConfigSet

type ConfigSet struct {
	// Configurations contains the controller configurations.
	Configurations       map[string]*ControllerConfig `` /* 169-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}                     `json:"-"`
	XXX_unrecognized     []byte                       `json:"-"`
	XXX_sizecache        int32                        `json:"-"`
}

ConfigSet contains a configuration set.

func NewConfigSet

func NewConfigSet(c configset.ConfigSet) (*ConfigSet, error)

NewConfigSet constructs a configset from a configset.ConfigSet.

func (*ConfigSet) Descriptor

func (*ConfigSet) Descriptor() ([]byte, []int)

func (*ConfigSet) GetConfigurations

func (m *ConfigSet) GetConfigurations() map[string]*ControllerConfig

func (*ConfigSet) ProtoMessage

func (*ConfigSet) ProtoMessage()

func (*ConfigSet) Reset

func (m *ConfigSet) Reset()

func (*ConfigSet) Resolve

func (c *ConfigSet) Resolve(ctx context.Context, b bus.Bus) (configset.ConfigSet, error)

Resolve resolves the configset into a configset.ConfigSet

func (*ConfigSet) String

func (m *ConfigSet) String() string

func (*ConfigSet) XXX_DiscardUnknown

func (m *ConfigSet) XXX_DiscardUnknown()

func (*ConfigSet) XXX_Marshal

func (m *ConfigSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ConfigSet) XXX_Merge

func (m *ConfigSet) XXX_Merge(src proto.Message)

func (*ConfigSet) XXX_Size

func (m *ConfigSet) XXX_Size() int

func (*ConfigSet) XXX_Unmarshal

func (m *ConfigSet) XXX_Unmarshal(b []byte) error

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) (ConfigSetMap, error)

NewConfigSetMap packs a configset to a proto object.

func (ConfigSetMap) Resolve

func (c ConfigSetMap) Resolve(ctx context.Context, b bus.Bus) (configset.ConfigSet, error)

Resolve resolves the configset into a configset.ConfigSet

type ControllerConfig

type ControllerConfig struct {
	// Id is the config ID.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Revision is the revision number of the configuration.
	Revision uint64 `protobuf:"varint,2,opt,name=revision,proto3" json:"revision,omitempty"`
	// Config is the configuration object in protobuf form.
	Config               []byte   `protobuf:"bytes,3,opt,name=config,proto3" json:"config,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ControllerConfig contains a controller configuration.

func NewControllerConfig

func NewControllerConfig(c configset.ControllerConfig) (*ControllerConfig, error)

NewControllerConfig constructs a new controller config.

func (*ControllerConfig) Descriptor

func (*ControllerConfig) Descriptor() ([]byte, []int)

func (*ControllerConfig) GetConfig

func (m *ControllerConfig) GetConfig() []byte

func (*ControllerConfig) GetId

func (m *ControllerConfig) GetId() string

func (*ControllerConfig) GetRevision

func (m *ControllerConfig) GetRevision() uint64

func (*ControllerConfig) ProtoMessage

func (*ControllerConfig) ProtoMessage()

func (*ControllerConfig) Reset

func (m *ControllerConfig) Reset()

func (*ControllerConfig) Resolve

Resolve resolves the config into a configset.ControllerConfig

func (*ControllerConfig) String

func (m *ControllerConfig) String() string

func (*ControllerConfig) Validate

func (c *ControllerConfig) Validate() error

Validate performs cursory validation of the controller config.

func (*ControllerConfig) XXX_DiscardUnknown

func (m *ControllerConfig) XXX_DiscardUnknown()

func (*ControllerConfig) XXX_Marshal

func (m *ControllerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ControllerConfig) XXX_Merge

func (m *ControllerConfig) XXX_Merge(src proto.Message)

func (*ControllerConfig) XXX_Size

func (m *ControllerConfig) XXX_Size() int

func (*ControllerConfig) XXX_Unmarshal

func (m *ControllerConfig) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL