imon

package
v3.0.0-rc67 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 60 Imported by: ? 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

Overview

Package imon is responsible for of local instance state

It provides the cluster data:
	["cluster", "node", <localhost>, "services", "status", <instance>, "monitor"]
	["cluster", "node", <localhost>, "services", "imon", <instance>]

imon are created by the local instcfg, with parent context instcfg context.
instcfg done => imon done

worker watches on local instance status updates to clear reached status
	=> unsetStatusWhenReached
	=> orchestrate
	=> pub new state if change

worker watches on remote instance imon updates converge global expects
	=> convergeGlobalExpectFromRemote
	=> orchestrate
	=> pub new state if change

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetCmdPathForTest

func SetCmdPathForTest(s string)

SetCmdPathForTest set the opensvc command path for tests

Types

type Factory

type Factory struct {
	DrainDuration time.Duration
	SubQS         pubsub.QueueSizer
	DelayDuration time.Duration

	// Workers, when set, counts the workers of the monitors started,
	// each done when its worker returns: a test waits on it after
	// cancelling the daemon, before the next one resets the paths and
	// the data the workers read. The daemon leaves it nil.
	Workers *sync.WaitGroup
}

func (Factory) Start

func (f Factory) Start(parent context.Context, p naming.Path, nodes []string) error

Start creates a new imon and starts worker goroutine to manage local instance monitor

type Manager

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

func (*Manager) AllInstanceMonitorState

func (t *Manager) AllInstanceMonitorState(s instance.MonitorState) bool

func (*Manager) AllInstanceMonitors

func (t *Manager) AllInstanceMonitors() map[string]instance.Monitor

func (*Manager) GetInstanceMonitor

func (t *Manager) GetInstanceMonitor(node string) (instance.Monitor, bool)

func (*Manager) IsInstanceStartFailed

func (t *Manager) IsInstanceStartFailed(node string) (bool, bool)

func (*Manager) IsInstanceStatusNotApplicable

func (t *Manager) IsInstanceStatusNotApplicable(node string) (bool, bool)

func (*Manager) IsNodeMonitorStatusRankable

func (t *Manager) IsNodeMonitorStatusRankable(node string) (bool, bool)

func (*Manager) UnfrozenFromIdle

func (t *Manager) UnfrozenFromIdle()

func (*Manager) UnprovisionedFromIdle

func (t *Manager) UnprovisionedFromIdle()

func (*Manager) UnprovisionedFromWaitNonLeader

func (t *Manager) UnprovisionedFromWaitNonLeader()

Jump to

Keyboard shortcuts

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