triggers

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

README

TRIGGERS Plugin

Documentation

Documentation

Index

Constants

View Source
const (
	// Name ...
	Name = "triggers"
	// TopicSystemStart ...
	TopicSystemStart = "system/event/start" //todo move
	// TopicSystemStop ...
	TopicSystemStop = "system/event/stop" //todo move

	Version = "0.0.1"
)

Variables

Functions

func New

func New() supervisor.Pluggable

New ...

Types

type IGetTrigger

type IGetTrigger interface {
	GetTrigger(string) (ITrigger, error)
}

IGetTrigger ...

type IRegistrar

type IRegistrar interface {
	RegisterTrigger(ITrigger) error
	UnregisterTrigger(string) error
	TriggerList() []string
}

IRegistrar ...

type ITrigger

type ITrigger interface {
	Name() string
	AsyncAttach(wg *sync.WaitGroup)
	Subscribe(Subscriber) error
	Unsubscribe(Subscriber) error
	FunctionName() string
}

todo deAttach

type Subscriber

type Subscriber struct {
	EntityId *common.EntityId
	Handler  interface{}
	Payload  m.Attributes
}

Subscriber ...

Jump to

Keyboard shortcuts

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