server

package
v0.0.0-...-0ca9e23 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetListenerOnFreePort

func GetListenerOnFreePort() (*net.TCPListener, int, error)

obtem um listener em porta livre

func GetListenerOnPort

func GetListenerOnPort(porta int) (*net.TCPListener, int, error)

Fechar o listener é responsabilidade de quem chama para garantir que a alocação de multiplas portas aleatórias não colidam

func GetListenerWithFallback

func GetListenerWithFallback(maxTries, fallback int) (*net.TCPListener, int, error)

obtem um listener em porta livre com retry e fallback

Types

type GRPC

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

func NewGRPC

func NewGRPC(cfg *config.Cfg) (*GRPC, error)

func (*GRPC) Shutdown

func (g *GRPC) Shutdown(_ context.Context) error

func (*GRPC) Start

func (g *GRPC) Start(_ context.Context, chErr chan error)

Jump to

Keyboard shortcuts

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