bus

package
v3.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddInstancesTopic            = "add-instances"
	UpdatedInstancesTopic        = "updated-instances"
	DeletedInstancesTopic        = "deleted-instances"
	ResourceUpdateTopic          = "resource-update"
	NginxConfigUpdateTopic       = "nginx-config-update"
	InstanceHealthTopic          = "instance-health"
	ConfigUploadRequestTopic     = "config-upload-request"
	DataPlaneResponseTopic       = "data-plane-response"
	ConnectionCreatedTopic       = "connection-created"
	CredentialUpdatedTopic       = "credential-updated"
	ConnectionResetTopic         = "connection-reset"
	ConfigApplyRequestTopic      = "config-apply-request"
	WriteConfigSuccessfulTopic   = "write-config-successful"
	ConfigApplySuccessfulTopic   = "config-apply-successful"
	ConfigApplyFailedTopic       = "config-apply-failed"
	ConfigApplyCompleteTopic     = "config-apply-complete"
	RollbackWriteTopic           = "rollback-write"
	DataPlaneHealthRequestTopic  = "data-plane-health-request"
	DataPlaneHealthResponseTopic = "data-plane-health-response"
	APIActionRequestTopic        = "api-action-request"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Name string
}

type Message

type Message struct {
	Data  Payload
	Topic string
}

type MessagePipe

type MessagePipe struct {
	// contains filtered or unexported fields
}

func NewMessagePipe

func NewMessagePipe(size int) *MessagePipe

func (*MessagePipe) DeRegister

func (p *MessagePipe) DeRegister(ctx context.Context, pluginNames []string) error

func (*MessagePipe) Index added in v3.1.0

func (p *MessagePipe) Index(pluginName string, plugins []Plugin) int

func (*MessagePipe) IsPluginRegistered

func (p *MessagePipe) IsPluginRegistered(pluginName string) bool

func (*MessagePipe) Plugins added in v3.1.0

func (p *MessagePipe) Plugins() []Plugin

func (*MessagePipe) Process

func (p *MessagePipe) Process(ctx context.Context, messages ...*Message)

func (*MessagePipe) Register

func (p *MessagePipe) Register(size int, plugins []Plugin) error

func (*MessagePipe) Run

func (p *MessagePipe) Run(ctx context.Context)

type MessagePipeInterface

type MessagePipeInterface interface {
	Register(size int, plugins []Plugin) error
	DeRegister(ctx context.Context, plugins []string) error
	Process(ctx context.Context, messages ...*Message)
	Run(ctx context.Context)
	Plugins() []Plugin
	IsPluginRegistered(pluginName string) bool
}

type MessageWithContext

type MessageWithContext struct {
	// contains filtered or unexported fields
}

type Payload

type Payload interface{}

type Plugin

type Plugin interface {
	Init(ctx context.Context, messagePipe MessagePipeInterface) error
	Close(ctx context.Context) error
	Info() *Info
	Process(ctx context.Context, msg *Message)
	Subscriptions() []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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