event

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 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 {
	Key() string
	Value() []byte
}

func NewMessage

func NewMessage(key string, value []byte) Event

type Handler

type Handler func(context.Context, Event) error

type Message

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

func (*Message) Key

func (m *Message) Key() string

func (*Message) Value

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

type Receiver

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

type Sender

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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