agent

package
v0.8.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	CondRemoteWrite = "Remote Write"
	CondRuleSync    = "Rule Sync"
)

Variables

View Source
var TimeDeltaMillis = time.Minute.Milliseconds()

Functions

func Scheme

func Scheme(ctx context.Context) meta.Scheme

Types

type HttpServer

type HttpServer struct {
	apiextensions.UnsafeHTTPAPIExtensionServer
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(ct health.ConditionTracker, lg *zap.SugaredLogger) *HttpServer

func (*HttpServer) ConfigureRoutes

func (s *HttpServer) ConfigureRoutes(router *gin.Engine)

func (*HttpServer) SetEnabled

func (s *HttpServer) SetEnabled(enabled bool)

func (*HttpServer) SetRemoteWriteClient

func (s *HttpServer) SetRemoteWriteClient(client clients.Locker[remotewrite.RemoteWriteClient])

type MetricsNode

type MetricsNode struct {
	capabilityv1.UnsafeNodeServer
	controlv1.UnsafeHealthServer

	// we only need a subset of the methods
	remoteread.UnsafeRemoteReadAgentServer
	// contains filtered or unexported fields
}

func (*MetricsNode) AddConfigListener

func (m *MetricsNode) AddConfigListener(ch chan<- *node.MetricsCapabilityConfig)

func (*MetricsNode) Discover added in v0.8.2

func (*MetricsNode) GetHealth

func (m *MetricsNode) GetHealth(_ context.Context, _ *emptypb.Empty) (*corev1.Health, error)

func (*MetricsNode) GetTargetStatus added in v0.8.2

func (*MetricsNode) Info

func (*MetricsNode) SetHealthListenerClient

func (m *MetricsNode) SetHealthListenerClient(client controlv1.HealthListenerClient)

func (*MetricsNode) SetIdentityClient

func (m *MetricsNode) SetIdentityClient(client controlv1.IdentityClient)

func (*MetricsNode) SetNodeClient

func (m *MetricsNode) SetNodeClient(client node.NodeMetricsCapabilityClient)

func (*MetricsNode) SetNodeDriver added in v0.8.2

func (m *MetricsNode) SetNodeDriver(driver drivers.MetricsNodeDriver)

func (*MetricsNode) SetRemoteWriter added in v0.8.2

func (m *MetricsNode) SetRemoteWriter(client clients.Locker[remotewrite.RemoteWriteClient])

func (*MetricsNode) Start added in v0.8.2

func (*MetricsNode) Stop added in v0.8.2

func (*MetricsNode) SyncNow

func (m *MetricsNode) SyncNow(_ context.Context, req *capabilityv1.Filter) (*emptypb.Empty, 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 RemoteReader added in v0.8.2

type RemoteReader interface {
	Read(ctx context.Context, endpoint string, request *prompb.ReadRequest) (*prompb.ReadResponse, error)
}

func NewRemoteReader added in v0.8.2

func NewRemoteReader(prometheusClient *http.Client) RemoteReader

type RuleStreamer

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

func (*RuleStreamer) Run

func (s *RuleStreamer) Run(ctx context.Context, config *v1beta1.RulesSpec) error

func (*RuleStreamer) SetRemoteWriteClient

func (s *RuleStreamer) SetRemoteWriteClient(client remotewrite.RemoteWriteClient)

type TargetRunMetadata added in v0.8.2

type TargetRunMetadata struct {
	Target *remoteread.Target
	Query  *remoteread.Query
}

type TargetRunner added in v0.8.2

type TargetRunner interface {
	Start(target *remoteread.Target, query *remoteread.Query) error
	Stop(name string) error
	GetStatus(name string) (*remoteread.TargetStatus, error)
	SetRemoteWriteClient(client clients.Locker[remotewrite.RemoteWriteClient])
	SetRemoteReaderClient(client RemoteReader)
}

func NewTargetRunner added in v0.8.2

func NewTargetRunner(logger *zap.SugaredLogger) TargetRunner

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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