Help us shape the future of Go! Take the 2026 Go Developer Survey

data

package
v1.27.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
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

type Message struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

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

func NewMessageWithExtra(msg interface{}, extra map[string]interface{}) *Message

NewMessageWithExtra creates a Message struct with "main" and extra data

func (*Message) ApplyPlaceholder

func (d *Message) ApplyPlaceholder(template interface{}) (string, error)

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

func (d *Message) Clone() *Message

Clone creates a deep copy of the Message struct

func (*Message) GetExtra

func (d *Message) GetExtra() map[string]interface{}

GetExtra returns all the "extra" data in the Message struct

func (*Message) GetMessage

func (d *Message) GetMessage() interface{}

GetMessage returns the "main" data in the Message struct

func (*Message) GetTarget

func (d *Message) GetTarget(name string) interface{}

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

func (d *Message) IsFirstRun() bool

IsFirstRun return the status of the firstRun flag

func (*Message) SetExtra

func (d *Message) SetExtra(k string, v interface{})

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

func (*Message) SetTarget

func (d *Message) SetTarget(name string, value interface{})

SetTarget is like SetExtra but it can change also the "main" key

Jump to

Keyboard shortcuts

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