Documentation ¶
Index ¶
- func StartApi(data data.Database, metrics metric.Metrics, config *Configuration, ...) error
- type Api
- func (a *Api) ListNodes(ctx context.Context, req *connect.Request[apiv1.ListNodesRequest]) (*connect.Response[apiv1.ListNodesResponse], error)
- func (a *Api) ListSamples(ctx context.Context, req *connect.Request[apiv1.ListSampleRequest]) (*connect.Response[apiv1.ListSampleResponse], error)
- func (a *Api) NewAuthHandler(h http.Handler) http.Handler
- func (a *Api) NewAuthInterceptor() connect.UnaryInterceptorFunc
- type Configuration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartApi ¶
func StartApi(data data.Database, metrics metric.Metrics, config *Configuration, log *zap.SugaredLogger) error
StartApi starts the API server of the canary
Types ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
Api implements the protobuf interface
func (*Api) ListNodes ¶
func (a *Api) ListNodes(ctx context.Context, req *connect.Request[apiv1.ListNodesRequest]) (*connect.Response[apiv1.ListNodesResponse], error)
ListNodes lists all known nodes in mesh
func (*Api) ListSamples ¶
func (a *Api) ListSamples(ctx context.Context, req *connect.Request[apiv1.ListSampleRequest]) (*connect.Response[apiv1.ListSampleResponse], error)
ListSamples lists all measured samples of the canary
func (*Api) NewAuthHandler ¶
NewAuthHandler returns a handler for HTTP authorization
func (*Api) NewAuthInterceptor ¶
func (a *Api) NewAuthInterceptor() connect.UnaryInterceptorFunc
NewAuthInterceptor returns grpc auth interceptor to handle authorization
Click to show internal directories.
Click to hide internal directories.