roles

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRoleNotConfigured = errors.New("role: Not configured")

Functions

This section is empty.

Types

type Event

type Event struct {
	Context context.Context

	Payload EventPayload
	// contains filtered or unexported fields
}

func NewEvent

func NewEvent(ctx context.Context, data map[string]interface{}) *Event

func (*Event) String

func (ev *Event) String() string

func (*Event) WithTopic

func (ev *Event) WithTopic(topic string) *Event

type EventHandler

type EventHandler func(ev *Event)

type EventPayload

type EventPayload struct {
	Data                 map[string]interface{}
	RelatedObjectKey     *storage.Key
	RelatedObjectOptions []clientv3.OpOption
}

type Instance

type Instance interface {
	KV() *storage.Client
	Log() *zap.Logger
	DispatchEvent(topic string, ev *Event)
	AddEventListener(topic string, handler EventHandler)
	Context() context.Context
}

type Role

type Role interface {
	Start(ctx context.Context, config []byte) error
	Stop()
}

Directories

Path Synopsis
api
oui
Updated version of https://github.com/dutchcoders/go-ouitools Package go-oui provides functions to work with MAC and OUI's
Updated version of https://github.com/dutchcoders/go-ouitools Package go-oui provides functions to work with MAC and OUI's
dns

Jump to

Keyboard shortcuts

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