imon

package
v0.0.0-...-6295505 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

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
}

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) ThawedFromIdle

func (t *Manager) ThawedFromIdle()

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