events

package
v0.0.0-...-98cf823 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventChanSize = 4096
)

Variables

View Source
var DisconnectedErr = errors.New("Service Disconnected ")

Functions

func NewEventService

func NewEventService(bufSize int) *defaultEventService

Types

type Event

type Event struct {
	Type    string
	PayLoad interface{}
}

func (*Event) GetPayLoad

func (e *Event) GetPayLoad() interface{}

func (*Event) GetType

func (e *Event) GetType() string

type IEvent

type IEvent interface {
	GetType() string
	GetPayLoad() interface{}
}

type Service

type Service interface {
	Connect() error

	Disconnect() error

	Get(ctx context.Context) (IEvent, error)

	Put(ctx context.Context, event IEvent) error
}

Jump to

Keyboard shortcuts

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