udwRpc2

package
v0.0.0-...-f254aa5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2020 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PanicToErrMsg

func PanicToErrMsg(f func()) (errMsg string)

Types

type ClientHub

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

func NewClientHub

func NewClientHub(req ClientReq) *ClientHub

func (*ClientHub) RequestCb

func (ch *ClientHub) RequestCb(cb func(ctx *ReqCtx)) (errMsg string)

type ClientReq

type ClientReq struct {
	Addr           string
	MaxOpenConnNum int
	MaxIdleTime    time.Duration
}

type ClientStat

type ClientStat struct {
	GetConnNum    int
	NewConnNum    int
	InFreeConnNum int

	IsClose       bool
	CachedStmtNum int
}

type Conn

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

func (*Conn) Close

func (conn *Conn) Close()

type PeerIp

type PeerIp struct {
	Ip string
}

type ReqCtx

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

func (*ReqCtx) Close

func (ctx *ReqCtx) Close()

func (*ReqCtx) GetPeerIp

func (ctx *ReqCtx) GetPeerIp() string

func (*ReqCtx) GetReader

func (ctx *ReqCtx) GetReader() *udwShm.ShmReader

func (*ReqCtx) GetWriter

func (ctx *ReqCtx) GetWriter() *udwShm.ShmWriter

type RpcError

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

func NewNetworkError

func NewNetworkError(errMsg string) *RpcError

func NewOtherError

func NewOtherError(errMsg string) *RpcError

func (*RpcError) Error

func (err *RpcError) Error() string

func (*RpcError) IsNetworkError

func (err *RpcError) IsNetworkError() bool

type ServerHub

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

func NewServerHub

func NewServerHub(req ServerReq) *ServerHub

func (*ServerHub) Close

func (sh *ServerHub) Close()

type ServerReq

type ServerReq struct {
	Addr        string
	MaxIdleTime time.Duration
	Handler     func(ctx *ReqCtx)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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