agent

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 *zap.SugaredLogger,
	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 {
	util.Initializer
	// contains filtered or unexported fields
}

func NewRuleStreamer

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

func (*RuleStreamer) ConfigureNode

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

func (*RuleStreamer) Initialize

func (r *RuleStreamer) Initialize(ruleSyncClient rules.RuleSyncClient)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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