Documentation ¶
Index ¶
- Constants
- type Event
- type Message
- func (d *Message) ApplyPlaceholder(template interface{}) (string, error)
- func (d *Message) ClearFirstRun()
- func (d *Message) Clone() *Message
- func (d *Message) GetExtra() map[string]interface{}
- func (d *Message) GetMessage() interface{}
- func (d *Message) GetTarget(name string) interface{}
- func (d *Message) IsFirstRun() bool
- func (d *Message) SetExtra(k string, v interface{})
- func (d *Message) SetFirstRun()
- func (d *Message) SetMessage(msg interface{})
- func (d *Message) SetTarget(name string, value interface{})
Constants ¶
const EventTopicName = "#EVENT_TYPE#"
EventTopicName name of the topic on the bus
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶ added in v1.3.1
type Event struct { Type string Content interface{} }
Event contains the info about what just happened
type Message ¶
Message is the data generated from a Feeder and it travels across Filters
func NewMessage ¶
func NewMessage(msg interface{}) *Message
NewMessage creates a new Message struct with only the "main" data
func NewMessageWithExtra ¶
NewMessageWithExtra creates a Message struct with "main" and extra data
func (*Message) ApplyPlaceholder ¶
ApplyPlaceholder executes the template specified using the data in the Message struct
func (*Message) ClearFirstRun ¶ added in v1.11.3
func (d *Message) ClearFirstRun()
ClearFirstRun clear the firstRun flag
func (*Message) GetMessage ¶
func (d *Message) GetMessage() interface{}
GetMessage returns the "main" data in the Message struct
func (*Message) GetTarget ¶
GetTarget returns the value of a key in the Message struct. It can return also the "main" data
func (*Message) IsFirstRun ¶ added in v1.11.3
IsFirstRun return the status of the firstRun flag
func (*Message) SetExtra ¶
SetExtra allows to change the "extra" data with key k and value v in the Message struct
func (*Message) SetFirstRun ¶ added in v1.11.3
func (d *Message) SetFirstRun()
SetFirstRun set the firstRun flag
func (*Message) SetMessage ¶
func (d *Message) SetMessage(msg interface{})
SetMessage allows to change the "main" data in the Message struct