clustering

package
v0.0.0-...-a0b9124 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DISPATCHER_TASK_TYPE_ALERTS_PARTITION = 0
	DISPATCHER_TASK_TYPE_ALERTS_MISSING   = 1
	DISPATCHER_TASK_TYPE_CLEANUP          = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertingState

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

type ClusterManager

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

func NewClusterManager

func NewClusterManager() *ClusterManager

func (*ClusterManager) Run

func (cm *ClusterManager) Run(parentCtx context.Context) error

type ClusterNode

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

func (*ClusterNode) CheckIn

func (node *ClusterNode) CheckIn(alertingState *AlertingState, participantLimit int) error

func (*ClusterNode) CheckInNodeProcessingMissingAlerts

func (node *ClusterNode) CheckInNodeProcessingMissingAlerts(alertingState *AlertingState) error

func (*ClusterNode) GetActiveNodesCount

func (node *ClusterNode) GetActiveNodesCount(heartbeat int64) (int, error)

func (*ClusterNode) GetLastHeartbeat

func (node *ClusterNode) GetLastHeartbeat() (int64, error)

func (*ClusterNode) GetMissingAlerts

func (node *ClusterNode) GetMissingAlerts() []*m.Alert

func (*ClusterNode) GetNode

func (node *ClusterNode) GetNode(currentNode *m.ActiveNode) (*m.ActiveNode, error)

func (*ClusterNode) GetNodeId

func (node *ClusterNode) GetNodeId() (string, error)

func (*ClusterNode) GetNodeProcessingMissingAlerts

func (node *ClusterNode) GetNodeProcessingMissingAlerts() *m.ActiveNode

type ClusterNodeMgmt

type ClusterNodeMgmt interface {
	GetNodeId() (string, error)
	CheckIn(alertingState *AlertingState, participantLimit int) error
	GetNode(node *m.ActiveNode) (*m.ActiveNode, error)
	CheckInNodeProcessingMissingAlerts(alertingState *AlertingState) error
	GetActiveNodesCount(heartbeat int64) (int, error)
	GetLastHeartbeat() (int64, error)
	GetMissingAlerts() []*m.Alert
	GetNodeProcessingMissingAlerts() *m.ActiveNode
}

type DispatcherTask

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

type DispatcherTaskAlertsMissing

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

type DispatcherTaskAlertsPartition

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

type DispatcherTaskStatus

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

Jump to

Keyboard shortcuts

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