messagebus

package
v0.0.0-...-0117b6e Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Overview

Package messagebus logic to send message and get reply over IPC

Index

Constants

View Source
const (
	DefaultCreateChannelRetryIntervalSeconds = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IMessageBus

type IMessageBus interface {
	Start() error
	SendSurveyMessage(survey *message.Message) ([]*message.Message, error)
	Stop()
}

IMessageBus is the interface for sending out survey message and receiving the result

type MessageBus

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

MessageBus contains the ipc channel to communicate to core agent.

func NewMessageBus

func NewMessageBus(context context.ICoreAgentContext) *MessageBus

NewMessageBus creates a new instance of message bus

func (*MessageBus) SendSurveyMessage

func (bus *MessageBus) SendSurveyMessage(survey *message.Message) ([]*message.Message, error)

SendSurveyMessage sends the health or termination survey message

func (*MessageBus) Start

func (bus *MessageBus) Start() error

Start starts the health and terminate worker message channel

func (*MessageBus) Stop

func (bus *MessageBus) Stop()

Stop stops the message channels

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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