server

package
v0.0.0-...-6f9dc6e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunGRPCServer

func RunGRPCServer(c *GRPCConfig) error

Types

type GRPCConfig

type GRPCConfig struct {
	Name         string
	Addr         string
	RegisterFunc func(*grpc.Server)
	Logger       *logger.Logger
}

type Hook

type Hook interface {
	// WithSignals add more signals into hook
	WithSignals(signals ...syscall.Signal) Hook

	// Close register shutdown handles
	Close(funcs ...func(sg os.Signal))
}

Hook a graceful shutdown hook, default with signals of SIGINT and SIGTERM

func NewHook

func NewHook() Hook

NewHook create a Hook instance

Jump to

Keyboard shortcuts

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