handler

package
v0.0.0-...-f767cfc Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCLogger

type GRPCLogger interface {
	InfoFields(msg string, fields map[string]any)
}

type Handler

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

func NewHandler

func NewHandler(options ...Option) *Handler

func (*Handler) Server

func (h *Handler) Server() Server

type Option

type Option func(h *Handler)

func WithGRPCLogger

func WithGRPCLogger(logger GRPCLogger) Option

func WithGRPCServerAddr

func WithGRPCServerAddr(addr string) Option

func WithRESTLogger

func WithRESTLogger(logger RESTLogger) Option

func WithRESTServerAddr

func WithRESTServerAddr(addr string) Option

func WithServices

func WithServices(services service.Services) Option

type RESTLogger

type RESTLogger interface {
	InfoFields(msg string, fields map[string]any)
}

type Server

type Server interface {
	ServeGRPC() error
	ServeREST() error
	ShutdownGRPC(ctx context.Context) error
	ShutdownREST(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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