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
func (*GRPCClient) TSDBStatistics ¶
func (gc *GRPCClient) TSDBStatistics(ctx context.Context, req *statuspb.TSDBStatisticsRequest) (map[string]*statuspb.TSDBStatisticsEntry, annotations.Annotations, error)
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 ¶
func (s *Proxy) TSDBStatistics(req *statuspb.TSDBStatisticsRequest, srv statuspb.Status_TSDBStatisticsServer) error
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 ¶
func (srv *Server) TSDBStatistics(r *statuspb.TSDBStatisticsRequest, s statuspb.Status_TSDBStatisticsServer) error
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 ¶
func (TSDBStatisticsGetterFunc) TSDBStatistics ¶
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.