status

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterStatusServer

func RegisterStatusServer(statusSrv statuspb.StatusServer) func(*grpc.Server)

RegisterStatusServer registers the status server.

func WithTSDBStatisticsGetter

func WithTSDBStatisticsGetter(tsg TSDBStatisticsGetter) func(*Server)

Types

type GRPCClient

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

func NewGRPCClient

func NewGRPCClient(ss statuspb.StatusServer) *GRPCClient

type Proxy

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

Proxy implements statuspb.Status gRPC that fanouts requests to given statuspb.Status servers.

func NewProxy

func NewProxy(logger log.Logger, statusClients func() []statuspb.StatusClient) *Proxy

NewProxy returns new status.Proxy.

func (*Proxy) TSDBStatistics

TSDBStatistics implements the statuspb.StatusServer interface.

type Server

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

Server implements the corresponding protobuf interface to provide status information about the given component.

func NewServer

func NewServer(
	component string,
	options ...ServerOptionFunc,
) *Server

NewServer creates a new server instance for the given component and with the specified options.

func (*Server) TSDBStatistics

TSDBStatistics implements the statuspb.StatusServer interface.

type ServerOptionFunc

type ServerOptionFunc func(*Server)

ServerOptionFunc represents a functional option to configure the status server.

type TSDBStatisticsGetter

type TSDBStatisticsGetter interface {
	// TSDBStatistics returns the TSDB statistics for the given tenant.
	// When tenantID is empty, it returns statistics for all tenants.
	TSDBStatistics(limit int, tenantID string) (map[string]tsdb.Stats, error)
}

TSDBStatisticsGetter is an interface to retrieve TSDB statistics.

type TSDBStatisticsGetterFunc

type TSDBStatisticsGetterFunc func(int, string) (map[string]tsdb.Stats, error)

func (TSDBStatisticsGetterFunc) TSDBStatistics

func (f TSDBStatisticsGetterFunc) TSDBStatistics(limit int, tenantID string) (map[string]tsdb.Stats, error)

type UnaryClient

type UnaryClient interface {
	TSDBStatistics(context.Context, *statuspb.TSDBStatisticsRequest) (map[string]*statuspb.TSDBStatisticsEntry, annotations.Annotations, error)
}

UnaryClient is a gRPC statuspb.Status client which expands the streaming status API. Useful for consumers that does not support streaming.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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