server

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const CName = "common.net.drpcserver"

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseDrpcServer

type BaseDrpcServer struct {
	*drpcmux.Mux
	// contains filtered or unexported fields
}

func NewBaseDrpcServer

func NewBaseDrpcServer() *BaseDrpcServer

func (*BaseDrpcServer) Close

func (s *BaseDrpcServer) Close(ctx context.Context) (err error)

func (*BaseDrpcServer) ListenAddrs

func (s *BaseDrpcServer) ListenAddrs() (addrs []net.Addr)

func (*BaseDrpcServer) Run

func (s *BaseDrpcServer) Run(ctx context.Context, params Params) (err error)

type DRPCHandlerWrapper

type DRPCHandlerWrapper func(handler drpc.Handler) drpc.Handler

type DRPCServer

type DRPCServer interface {
	app.ComponentRunnable
	drpc.Mux
}

func New

func New() DRPCServer

type Params

type Params struct {
	BufferSizeMb  int
	ListenAddrs   []string
	Wrapper       DRPCHandlerWrapper
	TimeoutMillis int
	Handshake     func(conn net.Conn) (cCtx context.Context, sc sec.SecureConn, err error)
}

Jump to

Keyboard shortcuts

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