dummy

package
v0.0.0-...-8c43e32 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthDummy        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDummy          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDummy = fmt.Errorf("proto: unexpected end of group")
)

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) Descriptor() ([]byte, []int)

func (*Config) GetSay

func (m *Config) GetSay() []string

func (*Config) GetWait

func (m *Config) GetWait() string

func (*Config) Marshal

func (m *Config) Marshal() (dAtA []byte, err error)

func (*Config) MarshalTo

func (m *Config) MarshalTo(dAtA []byte) (int, error)

func (*Config) MarshalToSizedBuffer

func (m *Config) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) Size

func (m *Config) Size() (n int)

func (*Config) String

func (m *Config) String() string

func (*Config) Unmarshal

func (m *Config) Unmarshal(dAtA []byte) error

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

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

func (*Config) XXX_Merge

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

func (*Config) XXX_MessageName

func (*Config) XXX_MessageName() string

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

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

type Dummy

type Dummy struct {
	// contains filtered or unexported fields
}

A Dummy says strings from its cfg.say every cfg.duration

func (*Dummy) ConfigURL

func (d *Dummy) ConfigURL() string

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

func (d *Dummy) Name() string

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) NewConfig

func (d *Dummy) NewConfig() proto.Message

func (*Dummy) SetDiscoveryChan

func (d *Dummy) SetDiscoveryChan(c chan<- types.Event)

func (*Dummy) SetMutationChan

func (d *Dummy) SetMutationChan(c <-chan types.Event)

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

func (d *Dummy) UpdateConfig(cfg proto.Message) (e error)

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.

Jump to

Keyboard shortcuts

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