Versions in this module Expand all Collapse all v0 v0.6.1 Jul 31, 2023 v0.0.4 Jul 31, 2023 Changes in this version + const BadSequenceID + const BitReadable + const BitWritable + const InternalError + const InvalidMessageTypeException + const InvalidProtocol + const InvalidTransform + const MeshHeader + const MissingResult + const ProtocolError + const ReadFailed + const UnknownApplicationException + const UnknownMethod + const UnsupportedClientType + const WrongMethodName + func FillSendMsgFromRecvMsg(recvMsg, sendMsg Message) + func NewByteBufferIO(buffer ByteBuffer) io.ReadWriter + func PutPayloadCode(name serviceinfo.PayloadCodec, v PayloadCodec) + func RecycleMessage(msg Message) + type BoundHandler interface + type ByteBuffer interface + AppendBuffer func(buf ByteBuffer) (err error) + Bytes func() (buf []byte, err error) + Flush func() (err error) + Malloc func(n int) (buf []byte, err error) + MallocLen func() (length int) + NewBuffer func() ByteBuffer + Next func(n int) (p []byte, err error) + Peek func(n int) (buf []byte, err error) + ReadBinary func(n int) (p []byte, err error) + ReadLen func() (n int) + ReadString func(n int) (s string, err error) + ReadableLen func() (n int) + Release func(e error) (err error) + Skip func(n int) (err error) + WriteBinary func(b []byte) (n int, err error) + WriteString func(s string) (n int, err error) + func NewReaderBuffer(buf []byte) ByteBuffer + func NewReaderWriterBuffer(size int) ByteBuffer + func NewWriterBuffer(size int) ByteBuffer + type ByteBufferFactory interface + NewByteBuffer func(conn net.Conn) (ByteBuffer, error) + type ByteBufferIO struct + func (p *ByteBufferIO) Read(b []byte) (n int, err error) + func (p *ByteBufferIO) Write(b []byte) (int, error) + type ClientOption struct + CliHandlerFactory ClientTransHandlerFactory + Codec Codec + ConnPool ConnPool + Dialer Dialer + EnableConnPoolReporter bool + PayloadCodec PayloadCodec + SvcInfo *serviceinfo.ServiceInfo + type ClientTransHandler interface + type ClientTransHandlerFactory interface + NewTransHandler func(opt *ClientOption) (ClientTransHandler, error) + type Codec interface + Decode func(ctx context.Context, msg Message, in ByteBuffer) error + Encode func(ctx context.Context, msg Message, out ByteBuffer) error + Name func() string + type CompressType int32 + const GZip + const NoCompress + type ConnOption struct + ConnectTimeout time.Duration + Dialer Dialer + type ConnPool interface + Close func() error + Discard func(conn net.Conn) error + Get func(ctx context.Context, network, address string, opt ConnOption) (net.Conn, error) + Put func(conn net.Conn) error + type ConnPoolReporter interface + EnableReporter func() + type Dialer interface + DialTimeout func(network, address string, timeout time.Duration) (net.Conn, error) + func NewDefaultDialer() Dialer + type DuplexBoundHandler interface + type FrameWrite interface + WriteData func(buf []byte) (err error) + WriteHeader func(buf []byte) (err error) + type GracefulShutdown interface + GracefulShutdown func(ctx context.Context) error + type InboundHandler interface + OnActive func(ctx context.Context, conn net.Conn) (context.Context, error) + OnInactive func(ctx context.Context, conn net.Conn) context.Context + OnMessage func(ctx context.Context, args, result Message) (context.Context, error) + OnRead func(ctx context.Context, conn net.Conn) (context.Context, error) + type InvokeHandleFuncSetter interface + SetInvokeHandleFunc func(inkHdlFunc endpoint.Endpoint) + type IsActive interface + IsActive func() bool + type LongConnPool interface + Clean func(network, address string) + type Message interface + Data func() interface{} + MessageType func() MessageType + NewData func(method string) (ok bool) + PayloadCodec func() PayloadCodec + PayloadLen func() int + ProtocolInfo func() ProtocolInfo + RPCInfo func() rpcinfo.RPCInfo + RPCRole func() RPCRole + Recycle func() + ServiceInfo func() *serviceinfo.ServiceInfo + SetMessageType func(MessageType) + SetPayloadCodec func(pc PayloadCodec) + SetPayloadLen func(size int) + SetProtocolInfo func(ProtocolInfo) + Tags func() map[string]interface{} + TransInfo func() TransInfo + func NewMessage(data interface{}, svcInfo *serviceinfo.ServiceInfo, ri rpcinfo.RPCInfo, ...) Message + func NewMessageWithNewer(svcInfo *serviceinfo.ServiceInfo, ri rpcinfo.RPCInfo, msgType MessageType, ...) Message + type MessageTagging func(ctx context.Context, msg Message) (context.Context, []string) + type MessageType int32 + const Call + const Exception + const InvalidMessageType + const Oneway + const Reply + const Stream + type MetaDecoder interface + DecodeMeta func(ctx context.Context, msg Message, in ByteBuffer) error + DecodePayload func(ctx context.Context, msg Message, in ByteBuffer) error + type MetaHandler interface + ReadMeta func(ctx context.Context, msg Message) (context.Context, error) + WriteMeta func(ctx context.Context, msg Message) (context.Context, error) + func NewProfilerMetaHandler(pr profiler.Profiler, tagging MessageTagging) MetaHandler + type NocopyWrite interface + WriteDirect func(buf []byte, remainCap int) error + type Option struct + Inbounds []InboundHandler + Outbounds []OutboundHandler + StreamingMetaHandlers []StreamingMetaHandler + func (o *Option) AppendBoundHandler(h BoundHandler) + func (o *Option) PrependBoundHandler(h BoundHandler) + type OutboundHandler interface + Write func(ctx context.Context, conn net.Conn, send Message) (context.Context, error) + type PayloadCodec interface + Marshal func(ctx context.Context, message Message, out ByteBuffer) error + Name func() string + Unmarshal func(ctx context.Context, message Message, in ByteBuffer) error + func GetPayloadCodec(message Message) (PayloadCodec, error) + type ProtocolInfo struct + CodecType serviceinfo.PayloadCodec + TransProto transport.Protocol + func NewProtocolInfo(tp transport.Protocol, ct serviceinfo.PayloadCodec) ProtocolInfo + type RPCRole int + const Client + const Server + type RawConn interface + RawConn func() net.Conn + type ServerOption struct + AcceptFailedDelayTime time.Duration + Address net.Addr + Codec Codec + ExitWaitTime time.Duration + GRPCCfg *grpc.ServerConfig + GRPCUnknownServiceHandler func(ctx context.Context, method string, stream streaming.Stream) error + InitOrResetRPCInfoFunc func(rpcinfo.RPCInfo, net.Addr) rpcinfo.RPCInfo + Listener net.Listener + MaxConnectionIdleTime time.Duration + PayloadCodec PayloadCodec + Profiler profiler.Profiler + ProfilerMessageTagging MessageTagging + ProfilerTransInfoTagging TransInfoTagging + ReadWriteTimeout time.Duration + ReusePort bool + SvcInfo *serviceinfo.ServiceInfo + SvrHandlerFactory ServerTransHandlerFactory + TracerCtl *rpcinfo.TraceController + TransServerFactory TransServerFactory + type ServerTransHandler interface + OnActive func(ctx context.Context, conn net.Conn) (context.Context, error) + OnRead func(ctx context.Context, conn net.Conn) error + type ServerTransHandlerFactory interface + NewTransHandler func(opt *ServerOption) (ServerTransHandler, error) + type StreamingMetaHandler interface + OnConnectStream func(ctx context.Context) (context.Context, error) + OnReadStream func(ctx context.Context) (context.Context, error) + type SynthesizedDialer struct + DialFunc func(network, address string, timeout time.Duration) (net.Conn, error) + func (sd SynthesizedDialer) DialTimeout(network, address string, timeout time.Duration) (net.Conn, error) + type TransError struct + func NewTransError(typeID int32, err error) *TransError + func NewTransErrorWithMsg(typeID int32, message string) *TransError + func (e TransError) AppendMessage(extraMsg string) *TransError + func (e TransError) Error() string + func (e TransError) Is(target error) bool + func (e TransError) TypeID() int32 + func (e TransError) Unwrap() error + type TransHandler interface + OnError func(ctx context.Context, err error, conn net.Conn) + OnInactive func(ctx context.Context, conn net.Conn) + OnMessage func(ctx context.Context, args, result Message) (context.Context, error) + SetPipeline func(pipeline *TransPipeline) + type TransInfo interface + PutTransIntInfo func(map[uint16]string) + PutTransStrInfo func(kvInfo map[string]string) + Recycle func() + TransIntInfo func() map[uint16]string + TransStrInfo func() map[string]string + type TransInfoTagging func(ctx context.Context, msg Message) (context.Context, []string) + type TransPipeline struct + func NewTransPipeline(netHdlr TransHandler) *TransPipeline + func (p *TransPipeline) AddInboundHandler(hdlr InboundHandler) *TransPipeline + func (p *TransPipeline) AddOutboundHandler(hdlr OutboundHandler) *TransPipeline + func (p *TransPipeline) GracefulShutdown(ctx context.Context) error + func (p *TransPipeline) OnActive(ctx context.Context, conn net.Conn) (context.Context, error) + func (p *TransPipeline) OnError(ctx context.Context, err error, conn net.Conn) + func (p *TransPipeline) OnInactive(ctx context.Context, conn net.Conn) + func (p *TransPipeline) OnMessage(ctx context.Context, args, result Message) (context.Context, error) + func (p *TransPipeline) OnRead(ctx context.Context, conn net.Conn) error + func (p *TransPipeline) Read(ctx context.Context, conn net.Conn, msg Message) (nctx context.Context, err error) + func (p *TransPipeline) SetPipeline(transPipe *TransPipeline) + func (p *TransPipeline) Write(ctx context.Context, conn net.Conn, sendMsg Message) (nctx context.Context, err error) + type TransReadWriter interface + Read func(ctx context.Context, conn net.Conn, msg Message) (nctx context.Context, err error) + Write func(ctx context.Context, conn net.Conn, send Message) (nctx context.Context, err error) + type TransServer interface + BootstrapServer func(net.Listener) (err error) + ConnCount func() utils.AtomicInt + CreateListener func(net.Addr) (net.Listener, error) + Shutdown func() error + type TransServerFactory interface + NewTransServer func(opt *ServerOption, transHdlr ServerTransHandler) TransServer + type TypeID interface + TypeID func() int32 + type TypeId interface + TypeId func() int32