haagent

package
v0.0.0-...-92348d9 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package haagent handles states for HA Agent feature.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component

type Component interface {
	// Enabled returns true if ha_agent.enabled is set to true
	Enabled() bool

	// GetGroup returns the value of ha_agent.group
	GetGroup() string

	// GetState returns current HA agent state
	GetState() State

	// SetLeader takes the leader agent hostname as input, if it matches the current agent hostname,
	// the state is set to active, otherwise standby.
	SetLeader(leaderAgentHostname string)

	// ShouldRunIntegration returns true if the integration should be run
	ShouldRunIntegration(integrationName string) bool
}

Component is the component type.

type State

type State string

State type for HA Agent State

const (
	// Active HA Agent state
	Active State = "active"
	// Standby HA Agent state
	Standby State = "standby"
	// Unknown HA Agent state
	Unknown State = "unknown"
)

Jump to

Keyboard shortcuts

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