broker

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: AGPL-3.0 Imports: 36 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayRegisteredModules added in v0.1.6

func DisplayRegisteredModules(sinkRegistry *api.SinkRegistry)

DisplayRegisteredModules displays all registered modules

func GetBroker

func GetBroker(config *api.MinionConfig, registry *api.SinkRegistry, metrics *api.Metrics) api.Broker

GetBroker returns a broker implementation

Types

type GrpcClient

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

GrpcClient represents the gRPC client implementation for the OpenNMS IPC API. This should be equivalent to MinionGrpcClient.java

func (*GrpcClient) Send

func (cli *GrpcClient) Send(msg *ipc.SinkMessage) error

Send forwards a Sink API message to the OpenNMS gRPC server. Attempts to restart the client when the stream is unavailable or the connection is not ready. Messages are discarded when the server is unavailable.

func (*GrpcClient) Start

func (cli *GrpcClient) Start() error

Start initializes the gRPC client. Returns an error when the configuration is incorrect or cannot connect to the server.

func (*GrpcClient) Stop

func (cli *GrpcClient) Stop()

Stop finalizes the gRPC client and all its dependencies.

type KafkaClient

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

KafkaClient represents the Kafka client implementation for the OpenNMS IPC API.

func (*KafkaClient) Send

func (cli *KafkaClient) Send(msg *ipc.SinkMessage) error

Send forwards a Sink API message to Kafka. Messages are discarded when the brokers are unavailable.

func (*KafkaClient) Start

func (cli *KafkaClient) Start() error

Start initializes the Kafka client. Returns an error when the configuration is incorrect or cannot connect to the server.

func (*KafkaClient) Stop

func (cli *KafkaClient) Stop()

Stop finalizes the Kafka client and all its dependencies.

Jump to

Keyboard shortcuts

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