eventbus

package
v0.2.17 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEvent

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

BaseEvent provides common fields for events.

func NewBaseEvent

func NewBaseEvent(name string) BaseEvent

NewBaseEvent creates a new BaseEvent with a unique ID and current timestamp.

func (*BaseEvent) EventID

func (b *BaseEvent) EventID() string

func (*BaseEvent) EventName

func (b *BaseEvent) EventName() string

func (*BaseEvent) Timestamp

func (b *BaseEvent) Timestamp() time.Time

type JsonCoder added in v0.2.17

type JsonCoder struct{}

JsonCoder implements eventbus.Coder for JSON.

func NewJsonCoder added in v0.2.17

func NewJsonCoder() *JsonCoder

NewJsonCoder creates a new JsonCoder.

func (*JsonCoder) Decode added in v0.2.17

func (c *JsonCoder) Decode(data []byte, v interface{}) error

func (*JsonCoder) Encode added in v0.2.17

func (c *JsonCoder) Encode(v interface{}) ([]byte, error)

type ProtoCoder added in v0.2.17

type ProtoCoder struct{}

ProtoCoder implements eventbus.Coder for Protobuf messages.

func NewProtoCoder added in v0.2.17

func NewProtoCoder() *ProtoCoder

NewProtoCoder creates a new ProtoCoder.

func (*ProtoCoder) Decode added in v0.2.17

func (c *ProtoCoder) Decode(data []byte, v interface{}) error

func (*ProtoCoder) Encode added in v0.2.17

func (c *ProtoCoder) Encode(v interface{}) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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