bus

package
v3.12.4 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	UpdatedInstancesTopic            = "updated-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"
	ContentUpdateRequestTopic        = "content-update-request"
	WriteConfigSuccessfulTopic       = "write-config-successful"
	EnableWatchersTopic              = "enable-watchers"
	DataPlaneHealthRequestTopic      = "data-plane-health-request"
	DataPlaneHealthResponseTopic     = "data-plane-health-response"
	APIActionRequestTopic            = "api-action-request"
	AgentConfigUpdateTopic           = "agent-config-update"
	ConnectionAgentConfigUpdateTopic = "connection-agent-config-update"
)

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, agentConfig *config.Config) *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) Reconfigure added in v3.6.0

func (p *MessagePipe) Reconfigure(ctx context.Context, agentConfig *mpi.AgentConfig, topic, correlationID string)

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
	Reconfigure(ctx context.Context, agentConfig *config.Config) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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