event

package
v0.0.0-...-28145eb Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	GetKey() string
	GetValue() []byte
}

type Handler

type Handler func(context.Context, Event) error

type Message

type Message struct {
	Key   string
	Value []byte
}

func NewMessage

func NewMessage(key string, value []byte) *Message

func (*Message) GetKey

func (m *Message) GetKey() string

func (*Message) GetValue

func (m *Message) GetValue() []byte

type Receiver

type Receiver interface {
	Receive(ctx context.Context, handler Handler) error
	Close() error
}

type Sender

type Sender interface {
	Send(ctx context.Context, topic string, msg Event) error
	Close() error
}

Jump to

Keyboard shortcuts

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