corpus

package
v0.0.0-...-352fc9d Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Mux        *chi.Mux
	Config     APIConfig
	Server     *http.Server
	Logger     *otelzap.Logger
	AddHandler http.Handler
}

func New

func New(config APIConfig, logger *otelzap.Logger, opts ...Option) API

func (API) Start

func (a API) Start()

func (API) Stop

func (a API) Stop()

type APIConfig

type APIConfig struct {
	Host string
	Port int
}

type GRPC

type GRPC[T any] struct {
	Logger *otelzap.Logger
	Server *grpc.Server
	// contains filtered or unexported fields
}

func NewGRPC

func NewGRPC[T any](cfg GRPCConfig, log *otelzap.Logger, checkHealth func() error, userMapper userMapperFunc[T], registrar func(g *grpc.Server)) GRPC[T]

func (*GRPC[T]) GracefulStop

func (g *GRPC[T]) GracefulStop()

func (*GRPC[T]) Start

func (g *GRPC[T]) Start()

func (*GRPC[T]) Watch

type GRPCConfig

type GRPCConfig struct {
	Port          uint16
	Host          string
	Issuer        string
	Env           string
	Audiences     []string
	OTLPCollector string
}

type Option

type Option func(*API)

func WithAdditionalHandler

func WithAdditionalHandler(pattern string, mux http.Handler) Option

Jump to

Keyboard shortcuts

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