broker

package
v0.7.71 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Request          ObjectType = "request-payload"
	MeshSync         ObjectType = "meshsync-data"
	LogStreamObject  ObjectType = "log-stream"
	SMI              ObjectType = "smi-data"
	ErrorObject      ObjectType = "error"
	ExecInputObject  ObjectType = "exec-input"
	ExecOutputObject ObjectType = "exec-output"
	ActiveExecObject ObjectType = "active-exec"

	Add        EventType = "ADDED"
	Update     EventType = "MODIFIED"
	Delete     EventType = "DELETED"
	ErrorEvent EventType = "ERROR"
	ReSync     EventType = "RESYNC"

	LogRequestEntity      RequestEntity = "log-stream"
	ReSyncDiscoveryEntity RequestEntity = "resync-discovery"
	ExecRequestEntity     RequestEntity = "exec-request"
	ActiveExecEntity      RequestEntity = "active-exec"
)
View Source
var (
	NotConnected = "not-connected"
)

Functions

This section is empty.

Types

type EventType

type EventType string

type Handler

type Handler interface {
	PublishInterface
	SubscribeInterface
	Info() string
	DeepCopyObject() Handler
	DeepCopyInto(Handler)
	IsEmpty() bool
	CloseConnection()
	ConnectedEndpoints() []string //To get the IP addresses of connected endpoints
}

type Message

type Message struct {
	ObjectType ObjectType
	EventType  EventType
	Request    *RequestObject
	Object     interface{}
}

type ObjectType

type ObjectType string

type PublishInterface

type PublishInterface interface {
	Publish(string, *Message) error
	PublishWithChannel(string, chan *Message) error
}

type RequestEntity added in v0.2.11

type RequestEntity string

type RequestObject added in v0.2.11

type RequestObject struct {
	Entity  RequestEntity
	Payload interface{}
}

type SubscribeInterface

type SubscribeInterface interface {
	Subscribe(string, string, []byte) error
	SubscribeWithChannel(string, string, chan *Message) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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