api

package
v0.0.0-...-395d267 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

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

ListNodes lists all known nodes in mesh

func (*Api) ListSamples

ListSamples lists all measured samples of the canary

func (*Api) NewAuthHandler

func (a *Api) NewAuthHandler(h http.Handler) http.Handler

NewAuthHandler returns a handler for HTTP authorization

func (*Api) NewAuthInterceptor

func (a *Api) NewAuthInterceptor() connect.UnaryInterceptorFunc

NewAuthInterceptor returns grpc auth interceptor to handle authorization

type Configuration

type Configuration struct {
	NodeName       string
	Address        string
	Port           int64
	Tokens         []string
	DebugGrpc      bool
	ServerCertPath string
	ServerKeyPath  string
	ServerCert     []byte
	ServerKey      []byte
	CaCertPath     []string
	CaCert         []byte
}

Jump to

Keyboard shortcuts

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