Documentation ¶
Index ¶
- func RegisterInfoServer(infoSrv infopb.InfoServer) func(*grpc.Server)
- type InfoServer
- type ServerOptionFunc
- func WithExemplarsInfoFunc(getExemplarsInfo ...func() *infopb.ExemplarsInfo) ServerOptionFunc
- func WithLabelSetFunc(getLabelSet ...func() []labelpb.ZLabelSet) ServerOptionFunc
- func WithMetricMetadataInfoFunc(getMetricMetadataInfo ...func() *infopb.MetricMetadataInfo) ServerOptionFunc
- func WithQueryAPIInfoFunc(queryInfo ...func() *infopb.QueryAPIInfo) ServerOptionFunc
- func WithRulesInfoFunc(getRulesInfo ...func() *infopb.RulesInfo) ServerOptionFunc
- func WithStoreInfoFunc(getStoreInfo ...func() *infopb.StoreInfo) ServerOptionFunc
- func WithTargetsInfoFunc(getTargetsInfo ...func() *infopb.TargetsInfo) ServerOptionFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterInfoServer ¶
func RegisterInfoServer(infoSrv infopb.InfoServer) func(*grpc.Server)
RegisterInfoServer registers the info server.
Types ¶
type InfoServer ¶
type InfoServer struct { infopb.UnimplementedInfoServer // contains filtered or unexported fields }
InfoServer implements the corresponding protobuf interface to provide information on which APIs are exposed by the given component.
func NewInfoServer ¶
func NewInfoServer( component string, options ...ServerOptionFunc, ) *InfoServer
NewInfoServer creates a new server instance for given component and with the specified options.
func (*InfoServer) Info ¶
func (srv *InfoServer) Info(ctx context.Context, req *infopb.InfoRequest) (*infopb.InfoResponse, error)
Info returns the information about label set and available APIs exposed by the component.
type ServerOptionFunc ¶
type ServerOptionFunc func(*InfoServer)
ServerOptionFunc represents a functional option to configure info server.
func WithExemplarsInfoFunc ¶
func WithExemplarsInfoFunc(getExemplarsInfo ...func() *infopb.ExemplarsInfo) ServerOptionFunc
WithExemplarsInfoFunc determines the function that should be executed to obtain the exemplars information. If no function is provided, the default empty exemplars info is returned. Only the first function from the list is considered.
func WithLabelSetFunc ¶
func WithLabelSetFunc(getLabelSet ...func() []labelpb.ZLabelSet) ServerOptionFunc
WithLabelSetFunc determines the function that should be executed to obtain the label set information. If no function is provided, the default empty label set is returned. Only the first function from the list is considered.
func WithMetricMetadataInfoFunc ¶
func WithMetricMetadataInfoFunc(getMetricMetadataInfo ...func() *infopb.MetricMetadataInfo) ServerOptionFunc
WithTargetsInfoFunc determines the function that should be executed to obtain the targets information. If no function is provided, the default empty targets info is returned. Only the first function from the list is considered.
func WithQueryAPIInfoFunc ¶ added in v0.26.0
func WithQueryAPIInfoFunc(queryInfo ...func() *infopb.QueryAPIInfo) ServerOptionFunc
WithQueryAPIInfoFunc determines the function that should be executed to obtain the query information. If no function is provided, the default empty query info is returned. Only the first function from the list is considered.
func WithRulesInfoFunc ¶
func WithRulesInfoFunc(getRulesInfo ...func() *infopb.RulesInfo) ServerOptionFunc
WithRulesInfoFunc determines the function that should be executed to obtain the rules information. If no function is provided, the default empty rules info is returned. Only the first function from the list is considered.
func WithStoreInfoFunc ¶
func WithStoreInfoFunc(getStoreInfo ...func() *infopb.StoreInfo) ServerOptionFunc
WithStoreInfoFunc determines the function that should be executed to obtain the store information. If no function is provided, the default empty store info is returned. Only the first function from the list is considered.
func WithTargetsInfoFunc ¶
func WithTargetsInfoFunc(getTargetsInfo ...func() *infopb.TargetsInfo) ServerOptionFunc
WithTargetsInfoFunc determines the function that should be executed to obtain the targets information. If no function is provided, the default empty targets info is returned. Only the first function from the list is considered.