agent

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CondRuleSync = "Rule Sync"
)

Variables

View Source
var RuleSyncInterval = time.Minute * 2

Functions

func Scheme

func Scheme(ctx context.Context) meta.Scheme

Types

type AlertingNode

type AlertingNode struct {
	capabilityv1.UnsafeNodeServer
	controlv1.UnsafeHealthServer
	// contains filtered or unexported fields
}

func NewAlertingNode

func NewAlertingNode(
	ctx context.Context,
	lg *slog.Logger,
	ct health.ConditionTracker,
) *AlertingNode

func (*AlertingNode) AddConfigListener

func (s *AlertingNode) AddConfigListener(p ConfigPropagator)

func (*AlertingNode) Conditions

func (s *AlertingNode) Conditions() health.ConditionTracker

func (*AlertingNode) GetHealth

func (s *AlertingNode) GetHealth(_ context.Context, _ *emptypb.Empty) (*corev1.Health, error)

func (*AlertingNode) SetClients

func (s *AlertingNode) SetClients(
	healthListenerClient controlv1.HealthListenerClient,
	nodeSyncClient node.NodeAlertingCapabilityClient,
	identityClient controlv1.IdentityClient,
)

func (*AlertingNode) SyncNow

type ConfigPropagator

type ConfigPropagator interface {
	ConfigureNode(nodeId string, config *node.AlertingCapabilityConfig) error
}

type Plugin

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

func NewPlugin

func NewPlugin(ctx context.Context) *Plugin

func (*Plugin) StreamServers

func (p *Plugin) StreamServers() []streamext.Server

func (*Plugin) UseStreamClient

func (p *Plugin) UseStreamClient(cc grpc.ClientConnInterface)

type RuleStreamer

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

func NewRuleStreamer

func NewRuleStreamer(
	ctx context.Context,
	lg *slog.Logger,
	ct healthpkg.ConditionTracker,
	nodeDriver drivers.NodeDriver,
) *RuleStreamer

func (*RuleStreamer) ConfigureNode

func (r *RuleStreamer) ConfigureNode(nodeId string, cfg *node.AlertingCapabilityConfig) error

func (*RuleStreamer) SetClients added in v0.12.0

func (r *RuleStreamer) SetClients(
	ruleClient rules.RuleSyncClient,
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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