server

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package server provides types that creates and runs server instances

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Gateway

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

func NewGateway

func NewGateway(ctx context.Context, addr string, mux *runtime.ServeMux, opts ...NewGatewayOption) (*Gateway, error)

func (*Gateway) Serve

func (g *Gateway) Serve(lis net.Listener) error

func (*Gateway) ServeTLS

func (g *Gateway) ServeTLS(lis net.Listener, certFile, keyFile string) error

func (*Gateway) Shutdown

func (g *Gateway) Shutdown(ctx context.Context) error

type NewGatewayOption

type NewGatewayOption func(g *Gateway)

func WithGrpcDialOption

func WithGrpcDialOption(opts ...grpc.DialOption) NewGatewayOption

func WithTLSConfig

func WithTLSConfig(t *tls.Config) NewGatewayOption

type NewServerOption

type NewServerOption func(*Server)

func WithGrpcOption

func WithGrpcOption(opts ...grpc.ServerOption) NewServerOption

func WithLogger

func WithLogger(lgr logger.Logger) NewServerOption

type Server

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

func New

func New(opts ...NewServerOption) (*Server, error)

func (*Server) ForceShutdown

func (s *Server) ForceShutdown()

func (*Server) RegisterService

func (s *Server) RegisterService(svcs ...services.Service) error

func (*Server) Serve

func (s *Server) Serve(lis net.Listener) error

func (*Server) Shutdown

func (s *Server) Shutdown()

Jump to

Keyboard shortcuts

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