api

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiServer

type ApiServer struct {
	// contains filtered or unexported fields
}

func NewAPIServer

func NewAPIServer(opts ...ApiServerOption) (*ApiServer, error)

func (*ApiServer) Addr

func (s *ApiServer) Addr() net.Addr

func (*ApiServer) Close

func (s *ApiServer) Close(timeout time.Duration)

func (*ApiServer) DialGRPC added in v0.3.0

func (s *ApiServer) DialGRPC(ctx context.Context) (*grpc.ClientConn, error)

func (*ApiServer) HttpAddr added in v0.3.0

func (s *ApiServer) HttpAddr() net.Addr

type ApiServerConfig added in v0.4.0

type ApiServerConfig struct {
	Ctx                  context.Context
	Log                  *zap.Logger
	ListenAddress        string
	HTTPListenAddress    string
	EnableReflection     bool
	RegistrationFunc     RegistrationFunc
	HTTPRegistrationFunc HttpRegistrationFunc
	JWTVerifier          authn.JWTVerifier
	PromRegistry         *prometheus.Registry
}

type ApiServerOption added in v0.4.0

type ApiServerOption func(*ApiServerConfig)

func WithContext added in v0.4.0

func WithContext(ctx context.Context) ApiServerOption

func WithHTTPListenAddress added in v0.4.0

func WithHTTPListenAddress(addr string) ApiServerOption

func WithHTTPRegistrationFunc added in v0.4.0

func WithHTTPRegistrationFunc(fn HttpRegistrationFunc) ApiServerOption

func WithJWTVerifier added in v0.4.0

func WithJWTVerifier(verifier authn.JWTVerifier) ApiServerOption

func WithListenAddress added in v0.4.0

func WithListenAddress(addr string) ApiServerOption

func WithLogger added in v0.4.0

func WithLogger(log *zap.Logger) ApiServerOption

func WithPrometheusRegistry added in v0.4.0

func WithPrometheusRegistry(reg *prometheus.Registry) ApiServerOption

func WithReflection added in v0.4.0

func WithReflection(enabled bool) ApiServerOption

func WithRegistrationFunc added in v0.4.0

func WithRegistrationFunc(fn RegistrationFunc) ApiServerOption

type HttpRegistrationFunc added in v0.3.0

type HttpRegistrationFunc func(gwmux *runtime.ServeMux, conn *grpc.ClientConn) error

type RegistrationFunc added in v0.1.1

type RegistrationFunc func(server *grpc.Server) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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