info

package
v0.36.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

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

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, error)) 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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