api

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package api implements the API server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer added in v0.5.1

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

func NewAPIServer

func NewAPIServer(opts ...APIServerOption) (*APIServer, error)

func (*APIServer) Addr added in v0.5.1

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

func (*APIServer) Close added in v0.5.1

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

func (*APIServer) DialGRPC added in v0.5.1

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

func (*APIServer) HTTPAddr added in v0.5.1

func (s *APIServer) HTTPAddr() net.Addr

type APIServerConfig added in v0.5.1

type APIServerConfig struct {
	Ctx                  context.Context
	Log                  *zap.Logger
	GRPCListener         net.Listener
	HTTPListener         net.Listener
	EnableReflection     bool
	RegistrationFunc     RegistrationFunc
	HTTPRegistrationFunc HTTPRegistrationFunc
	PromRegistry         *prometheus.Registry
	UnaryInterceptors    []grpc.UnaryServerInterceptor
	StreamInterceptors   []grpc.StreamServerInterceptor
}

type APIServerOption added in v0.5.1

type APIServerOption func(*APIServerConfig)

func WithContext added in v0.4.0

func WithContext(ctx context.Context) APIServerOption

func WithGRPCListener added in v0.5.0

func WithGRPCListener(listener net.Listener) APIServerOption

func WithHTTPListener added in v0.5.0

func WithHTTPListener(listener net.Listener) APIServerOption

func WithHTTPRegistrationFunc added in v0.4.0

func WithHTTPRegistrationFunc(fn HTTPRegistrationFunc) 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

func WithStreamInterceptors added in v0.5.0

func WithStreamInterceptors(interceptors ...grpc.StreamServerInterceptor) APIServerOption

func WithUnaryInterceptors added in v0.5.0

func WithUnaryInterceptors(interceptors ...grpc.UnaryServerInterceptor) APIServerOption

type HTTPRegistrationFunc added in v0.5.1

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
Package message implements the replication API service.
Package message implements the replication API service.
Package metadata implements the metadata API service.
Package metadata implements the metadata API service.
Package payer implements the Payer API service.
Package payer implements the Payer API service.

Jump to

Keyboard shortcuts

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