Documentation ¶
Index ¶
- Constants
- Variables
- func Scheme(ctx context.Context) meta.Scheme
- type HttpServer
- type MetricsNode
- func (m *MetricsNode) AddConfigListener(ch drivers.MetricsNodeConfigurator)
- func (m *MetricsNode) AddNodeDriver(driver drivers.MetricsNodeDriver)
- func (m *MetricsNode) Discover(ctx context.Context, request *remoteread.DiscoveryRequest) (*remoteread.DiscoveryResponse, error)
- func (m *MetricsNode) GetHealth(_ context.Context, _ *emptypb.Empty) (*corev1.Health, error)
- func (m *MetricsNode) GetTargetStatus(_ context.Context, request *remoteread.TargetStatusRequest) (*remoteread.TargetStatus, error)
- func (m *MetricsNode) Info(_ context.Context, _ *emptypb.Empty) (*capabilityv1.Details, error)
- func (m *MetricsNode) SetClients(nodeClient node.NodeMetricsCapabilityClient, ...)
- func (m *MetricsNode) SetRemoteWriter(client clients.Locker[remotewrite.RemoteWriteClient])
- func (m *MetricsNode) Start(_ context.Context, request *remoteread.StartReadRequest) (*emptypb.Empty, error)
- func (m *MetricsNode) Stop(_ context.Context, request *remoteread.StopReadRequest) (*emptypb.Empty, error)
- func (m *MetricsNode) SyncNow(_ context.Context, req *capabilityv1.Filter) (*emptypb.Empty, error)
- type Plugin
- type RemoteReader
- type RuleStreamer
- type TargetRunMetadata
- type TargetRunner
Constants ¶
View Source
const ( CondRemoteWrite = "Remote Write" CondRuleSync = "Rule Sync" CondNodeDriver = "Node Driver" )
Variables ¶
View Source
var TimeDeltaMillis = time.Minute.Milliseconds()
Functions ¶
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 NewMetricsNode ¶
func NewMetricsNode(ct health.ConditionTracker, lg *zap.SugaredLogger) *MetricsNode
func (*MetricsNode) AddConfigListener ¶
func (m *MetricsNode) AddConfigListener(ch drivers.MetricsNodeConfigurator)
func (*MetricsNode) AddNodeDriver ¶ added in v0.9.2
func (m *MetricsNode) AddNodeDriver(driver drivers.MetricsNodeDriver)
func (*MetricsNode) Discover ¶ added in v0.8.2
func (m *MetricsNode) Discover(ctx context.Context, request *remoteread.DiscoveryRequest) (*remoteread.DiscoveryResponse, error)
func (*MetricsNode) GetTargetStatus ¶ added in v0.8.2
func (m *MetricsNode) GetTargetStatus(_ context.Context, request *remoteread.TargetStatusRequest) (*remoteread.TargetStatus, error)
func (*MetricsNode) Info ¶
func (m *MetricsNode) Info(_ context.Context, _ *emptypb.Empty) (*capabilityv1.Details, error)
func (*MetricsNode) SetClients ¶ added in v0.9.2
func (m *MetricsNode) SetClients( nodeClient node.NodeMetricsCapabilityClient, identityClient controlv1.IdentityClient, healthListenerClient controlv1.HealthListenerClient, )
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 (m *MetricsNode) Start(_ context.Context, request *remoteread.StartReadRequest) (*emptypb.Empty, error)
func (*MetricsNode) Stop ¶ added in v0.8.2
func (m *MetricsNode) Stop(_ context.Context, request *remoteread.StopReadRequest) (*emptypb.Empty, error)
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 (*Plugin) ConfigureNode ¶ added in v0.10.0
func (p *Plugin) ConfigureNode(nodeId string, cfg *node.MetricsCapabilityConfig) error
func (*Plugin) StreamServers ¶
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 NewRuleStreamer ¶
func NewRuleStreamer(ct health.ConditionTracker, lg *zap.SugaredLogger) *RuleStreamer
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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.