Documentation ¶
Index ¶
- Variables
- func RegisterChannel(c Channel)
- type Action
- type Channel
- type Channels
- type CommonChannel
- type CommonLink
- func (l *CommonLink) GetDescription() string
- func (l *CommonLink) GetFields() data.Fields
- func (l *CommonLink) GetName() string
- func (l *CommonLink) Init() error
- func (l *CommonLink) Trigger(cxt context.Context, action Action) error
- func (l *CommonLink) Watch(shutdown <-chan struct{}, events chan<- Event)
- type Event
- type Link
- type LinkLifecycle
- type Placeholder
- type Placeholders
Constants ¶
This section is empty.
Variables ¶
View Source
var ChannelByIds = make(map[string]Channel)
Functions ¶
func RegisterChannel ¶
func RegisterChannel(c Channel)
Types ¶
type Channels ¶
type Channels struct { Links []json.RawMessage // contains filtered or unexported fields }
func (*Channels) MarshalJSON ¶
type CommonChannel ¶
func (CommonChannel) GetDescription ¶
func (c CommonChannel) GetDescription() string
func (CommonChannel) GetId ¶
func (c CommonChannel) GetId() string
func (CommonChannel) GetName ¶
func (c CommonChannel) GetName() string
func (CommonChannel) String ¶
func (c CommonChannel) String() string
type CommonLink ¶
type CommonLink struct { Channel string Name string `json:",omitempty"` Description string `json:",omitempty"` // contains filtered or unexported fields }
func (*CommonLink) GetDescription ¶
func (l *CommonLink) GetDescription() string
func (*CommonLink) GetFields ¶
func (l *CommonLink) GetFields() data.Fields
func (*CommonLink) GetName ¶
func (l *CommonLink) GetName() string
func (*CommonLink) Init ¶
func (l *CommonLink) Init() error
func (*CommonLink) Watch ¶
func (l *CommonLink) Watch(shutdown <-chan struct{}, events chan<- Event)
type Event ¶
type Event struct { LinkName string PointName string Time time.Time // optional, will be set to now() if omitted Metas Placeholders // headers Value interface{} // body }
type Link ¶
type Link interface { Init() error GetName() string GetDescription() string Watch(shutdown <-chan struct{}, events chan<- Event) Trigger(cxt context.Context, action Action) error GetFields() data.Fields }
func LinkFromJson ¶
type LinkLifecycle ¶
type LinkLifecycle struct {
// contains filtered or unexported fields
}
func NewLinkLifecycle ¶
func NewLinkLifecycle(link Link) LinkLifecycle
func (*LinkLifecycle) IsRunning ¶
func (p *LinkLifecycle) IsRunning() bool
func (*LinkLifecycle) Start ¶
func (p *LinkLifecycle) Start(events chan<- Event)
func (*LinkLifecycle) Stop ¶
func (p *LinkLifecycle) Stop()
type Placeholder ¶
type Placeholder struct { Name string //Type string Value interface{} }
type Placeholders ¶
type Placeholders []Placeholder
Click to show internal directories.
Click to hide internal directories.