events

package
v0.0.0-...-7b55a8f Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventHandler

type EventHandler interface {
	Handle(ctx context.Context, msg map[string]interface{}) error
	Cancel() error
}

type PubSub

type PubSub interface {
	Publisher
	Subscriber
}

type Publisher

type Publisher interface {
	Publish(ctx context.Context, topic string, msg map[string]interface{}) error
	Close() error
}

type Subscriber

type Subscriber interface {
	Subscribe(ctx context.Context, cfg SubscriberConfig) error
	Unsubscribe(ctx context.Context, id, topic string) error
	Close() error
}

type SubscriberConfig

type SubscriberConfig struct {
	ID      string
	Topic   string
	Handler EventHandler
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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