grpcserver

package module
v0.0.0-...-cef6852 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultServer

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

func (*DefaultServer) GetName

func (s *DefaultServer) GetName() string

func (*DefaultServer) Init

func (s *DefaultServer) Init(cfg DefaultServerConfig)

func (*DefaultServer) RegisterService

func (s *DefaultServer) RegisterService(sd *grpc.ServiceDesc, ss any)

func (*DefaultServer) Start

func (s *DefaultServer) Start(_ context.Context) error

func (*DefaultServer) Stop

func (s *DefaultServer) Stop(_ context.Context) error

type DefaultServerConfig

type DefaultServerConfig struct {
	StartTimeout secs.Seconds `validate:"seconds"`
	StopTimeout  secs.Seconds `validate:"seconds"`

	Host              string       `validate:"required,min=1"`
	ServiceId         int          `validate:"required,min=10,max=99"`
	MaxConnectionIdle secs.Seconds `validate:"seconds"`
	Timeout           secs.Seconds `validate:"seconds"`
	MaxConnectionAge  secs.Seconds `validate:"seconds"`
	Time              secs.Seconds `validate:"seconds"`
}

Jump to

Keyboard shortcuts

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