eventing

package
v0.0.0-...-3f54671 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	StartupEvent   = "event:startup"
	ShutdownEvent  = "event:shutdown"
	StartupPause   = "event:pause"
	ShutdownResume = "event:resume"
	ErrorEvent     = "event:error"
	RestartEvent   = "event:restart"
	FailoverEvent  = "event:failover"
	FailbackEvent  = "event:failback"
	PingEvent      = "event:ping"
	ProfileEvent   = "event:profile"
	VirtualHost    = "vhost"

	StatusInProgress  = -100
	StatusNotProvided = -101
)

Variables

View Source
var Directory *syncMap

Functions

func SendErrorResponse

func SendErrorResponse(from string, status int32)

func SendMessage

func SendMessage(msg Message) error

func SendResponse

func SendResponse(msg Message)

Types

type Message

type Message struct {
	To       string
	From     string
	Event    string
	Content  any
	Status   int32
	CreateTS time.Time
}

func CreateMessage

func CreateMessage(to, from, event string, status int32, content any) Message

type MessageHandler

type MessageHandler func(msg Message)

Jump to

Keyboard shortcuts

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