Documentation ¶
Index ¶
- Variables
- type Config
- func (*Config) Descriptor() ([]byte, []int)
- func (m *Config) GetSay() []string
- func (m *Config) GetWait() string
- func (m *Config) Marshal() (dAtA []byte, err error)
- func (m *Config) MarshalTo(dAtA []byte) (int, error)
- func (m *Config) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Config) ProtoMessage()
- func (m *Config) Reset()
- func (m *Config) Size() (n int)
- func (m *Config) String() string
- func (m *Config) Unmarshal(dAtA []byte) error
- func (m *Config) XXX_DiscardUnknown()
- func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Config) XXX_Merge(src proto.Message)
- func (*Config) XXX_MessageName() string
- func (m *Config) XXX_Size() int
- func (m *Config) XXX_Unmarshal(b []byte) error
- type Dummy
- func (d *Dummy) ConfigURL() string
- func (d *Dummy) Entry()
- func (d *Dummy) Init(api types.ModuleAPIClient)
- func (d *Dummy) Name() string
- func (d *Dummy) NewConfig() proto.Message
- func (d *Dummy) SetDiscoveryChan(c chan<- types.Event)
- func (d *Dummy) SetMutationChan(c <-chan types.Event)
- func (d *Dummy) Stop()
- func (d *Dummy) UpdateConfig(cfg proto.Message) (e error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Say []string `protobuf:"bytes,1,rep,name=say,proto3" json:"say,omitempty"` Wait string `protobuf:"bytes,2,opt,name=wait,proto3" json:"wait,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Config) Descriptor ¶
func (*Config) MarshalToSizedBuffer ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) XXX_DiscardUnknown ¶
func (m *Config) XXX_DiscardUnknown()
func (*Config) XXX_Marshal ¶
func (*Config) XXX_MessageName ¶
func (*Config) XXX_Unmarshal ¶
type Dummy ¶
type Dummy struct {
// contains filtered or unexported fields
}
A Dummy says strings from its cfg.say every cfg.duration
func (*Dummy) Entry ¶
func (d *Dummy) Entry()
Entry is the module entry point. Every module must have an Entry() It should already have an initialized API and a config in place before this is called.
func (*Dummy) Init ¶
func (d *Dummy) Init(api types.ModuleAPIClient)
Init initializes the module. If this exists, it will be called when the module is instantiated. It will be called before the API is initialized or the config is in place.
func (*Dummy) Name ¶
Name needs to return a uniquely identifying string. Every module must have a name. The URL to the module is a good choice.
func (*Dummy) SetDiscoveryChan ¶
func (*Dummy) SetMutationChan ¶
func (*Dummy) Stop ¶
func (d *Dummy) Stop()
Stop is responsible for making sure the module exits cleanly.Stop Every module must have a Stop() If this does not exit, it may get killed.
func (*Dummy) UpdateConfig ¶
UpdateConfig takes a new module configuration, and potentially adjusts to changes it contains. Any module that needs configuration (most) should have this defined. If it is defined, updates will occur when they are changed in the state.