Documentation
¶
Index ¶
- func Header(ctx context.Context) (map[string]string, bool)
- func NewContext(ctx context.Context, header map[string]string) context.Context
- func RegisterEncoder(enc Encoder)
- func SetDefaultEncoder(enc uint8)
- type CircuitBreaker
- type CliOption
- type CliOptionFunc
- type Client
- type ClientConn
- type Conn
- type Encoder
- type EndPoint
- type Handler
- type Message
- type Register
- type Service
- type SrvOption
- type SrvOptionFun
- type WKHeader
- type WkError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterEncoder ¶
func RegisterEncoder(enc Encoder)
func SetDefaultEncoder ¶
func SetDefaultEncoder(enc uint8)
Types ¶
type CircuitBreaker ¶
type CircuitBreaker interface {
NewCircuitBreaker(name string) CircuitBreaker
Run(fun func() error) error
Available() bool
}
type CliOption ¶
type CliOption interface {
// contains filtered or unexported methods
}
func WithCliEncoder ¶
func WithCliEndPoint ¶
func WithTimeout ¶
type CliOptionFunc ¶
type CliOptionFunc func(cli *Client)
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetEncoder ¶
type ClientConn ¶
type ClientConn struct {
// contains filtered or unexported fields
}
type Encoder ¶
type Encoder interface {
Encode(v interface{}) ([]byte, error)
Decode(data []byte, v interface{}) error
String() string
Value() uint8
}
func GetEncoder ¶
type EndPoint ¶
type Message ¶
type Message struct {
ReqId uint32
Obj string
Func string
ReqData []byte
ReqHeader map[string]string
RespData []byte
RespHeader map[string]string
Code int32
Desc string
}
func (*Message) RequestHeaderGet ¶
func (*Message) RespMessage ¶
func (m *Message) RespMessage() *pb.RespMessage
func (*Message) RespTimeout ¶
func (m *Message) RespTimeout() *pb.RespMessage
func (*Message) ResponseHeaderSet ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) SetWaitGroup ¶
type SrvOption ¶
type SrvOption interface {
// contains filtered or unexported methods
}
func WithHandler ¶
func WithInvokeTimeout ¶
func WithServiceEndpoint ¶
type SrvOptionFun ¶
type SrvOptionFun func(srv *Service)
Click to show internal directories.
Click to hide internal directories.