server

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GRPCServer

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

GRPCServer controll grpc server start/stop process

func NewGRPC

func NewGRPC(addr string, server *grpc.Server, opts ...GRPCServerOption) *GRPCServer

NewGRPC returns grpc server wrapper

func (*GRPCServer) Start

func (g *GRPCServer) Start() error

Start starts grpc server

func (*GRPCServer) Stop

func (g *GRPCServer) Stop() error

Stop gracefully stops grpc server

type GRPCServerOption

type GRPCServerOption func(*GRPCServer)

GRPCServerOption allows redefine default grpc server settings

func GRPCSkipErrors

func GRPCSkipErrors(skip bool) GRPCServerOption

GRPCSkipErrors sets silent mode for Start/Stop grpc server, skip all errors

type RadiusOption

type RadiusOption func(*RadiusServer)

RadiusOption allows redefine default settings

func RadiusShutdownTimeout

func RadiusShutdownTimeout(timeout time.Duration) RadiusOption

RadiusShutdownTimeout sets server shutdown timout, timeout should be great then zero

func RadiusSkipErrors

func RadiusSkipErrors(skip bool) RadiusOption

RadiusSkipErrors sets skip errors flag

type RadiusServer

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

RadiusServer wraps github.com/layeh/radius packet server

func NewRadius

func NewRadius(s *radius.PacketServer, opts ...RadiusOption) (*RadiusServer, error)

NewRadius return server

func (*RadiusServer) Start

func (s *RadiusServer) Start() error

Start radius server

func (*RadiusServer) Stop

func (s *RadiusServer) Stop() error

Stop radius server

Jump to

Keyboard shortcuts

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