grpc

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Config

type Config struct {
	Port              int  `validate:"gt=1000,lt=65536"`
	ReflectionEnabled bool `yaml:"reflection_enabled"`
	MaxRequestBytes   int  `yaml:"max_request_bytes" validate:"gt=0"`
	MaxResponseBytes  int  `yaml:"max_response_bytes" validate:"gt=0"`
}

type Server

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

func (Server) ListenAndServe

func (s Server) ListenAndServe(_ context.Context) error

func (Server) Validate

func (obj Server) Validate() error

func (Server) WaitForShutdown

func (s Server) WaitForShutdown(ctx context.Context) error

type ServerOption

type ServerOption c.Option[Server]

func WithServerLogger

func WithServerLogger(logger *zap.Logger) ServerOption

func WithServerName

func WithServerName(name string) ServerOption

func WithServerOptions

func WithServerOptions(opts ...grpc.ServerOption) ServerOption

func WithServerPort

func WithServerPort(port int) ServerOption

func WithServerReflection

func WithServerReflection(enabled bool) ServerOption

func WithServerShutdownTimeout

func WithServerShutdownTimeout(shutdownTimeout time.Duration) ServerOption

func WithService

func WithService(desc *grpc.ServiceDesc, impl any) ServerOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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