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: 1

Documentation

Overview

Package messagebus logic to send message and get reply over IPC

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IMessageBus

type IMessageBus interface {
	ProcessHealthRequest()
	ProcessTerminationRequest()
	GetTerminationRequestChan() chan bool
	GetTerminationChannelConnectedChan() chan bool
}

IMessageBus is the interface for process the core agent broadcast request

type MessageBus

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

MessageBus contains the ipc channel to communicate to core agent. It contains a reboot request channel that agent listens to

func NewMessageBus

func NewMessageBus(context context.T) *MessageBus

NewMessageBus creates a new instance of MessageBus

func (*MessageBus) GetTerminationChannelConnectedChan

func (bus *MessageBus) GetTerminationChannelConnectedChan() chan bool

GetTerminationChannelConnectedChan returns the channel notifying when termination channel is connected

func (*MessageBus) GetTerminationRequestChan

func (bus *MessageBus) GetTerminationRequestChan() chan bool

GetTerminationRequestChan returns the terminate request channel

func (*MessageBus) ProcessHealthRequest

func (bus *MessageBus) ProcessHealthRequest()

ProcessHealthRequest handles the health requests from core agent and process the relies on the HealthPing to determine if worker is still running

func (*MessageBus) ProcessTerminationRequest

func (bus *MessageBus) ProcessTerminationRequest()

ProcessTerminationRequest handles the termination requests from core agent CoreAgent sends termination message when itself is stopping, Worker use it to decide if itself should be terminated

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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