Documentation
¶
Index ¶
- Variables
- type Client
- type ClientOption
- type ClientPool
- type Context
- func (c *Context) AcceptTime() time.Time
- func (c *Context) Assert(i interface{}) error
- func (c *Context) Clone() (eocontext.EoContext, error)
- func (c *Context) Context() context.Context
- func (c *Context) EnableTls(b bool)
- func (c *Context) FastFinish() error
- func (c *Context) GetBalance() eocontext.BalanceHandler
- func (c *Context) GetComplete() eocontext.CompleteHandler
- func (c *Context) GetFinish() eocontext.FinishHandler
- func (c *Context) GetLabel(name string) string
- func (c *Context) GetUpstreamHostHandler() eocontext.UpstreamHostHandler
- func (c *Context) InsecureCertificateVerify(b bool)
- func (c *Context) Invoke(node eocontext.INode, timeout time.Duration) error
- func (c *Context) IsCloneable() bool
- func (c *Context) Labels() map[string]string
- func (c *Context) LocalAddr() net.Addr
- func (c *Context) LocalIP() net.IP
- func (c *Context) LocalPort() int
- func (c *Context) Proxy() grpc_context.IRequest
- func (c *Context) RealIP() string
- func (c *Context) Request() grpc_context.IRequest
- func (c *Context) RequestId() string
- func (c *Context) Response() grpc_context.IResponse
- func (c *Context) Scheme() string
- func (c *Context) SetBalance(handler eocontext.BalanceHandler)
- func (c *Context) SetCompleteHandler(handler eocontext.CompleteHandler)
- func (c *Context) SetFinish(handler eocontext.FinishHandler)
- func (c *Context) SetLabel(name, value string)
- func (c *Context) SetResponse(response grpc_context.IResponse)
- func (c *Context) SetUpstreamHostHandler(handler eocontext.UpstreamHostHandler)
- func (c *Context) Value(key interface{}) interface{}
- func (c *Context) WithValue(key, val interface{})
- type IClient
- type IClientPool
- type Request
- func (r *Request) ForwardIP() string
- func (r *Request) FullMethodName() string
- func (r *Request) Headers() metadata.MD
- func (r *Request) Host() string
- func (r *Request) Message(msgDesc *desc.MessageDescriptor) *dynamic.Message
- func (r *Request) Method() string
- func (r *Request) RealIP() string
- func (r *Request) Service() string
- func (r *Request) SetHost(s string)
- func (r *Request) SetMethod(method string)
- func (r *Request) SetService(service string)
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrConnShutdown = errors.New("grpc conn shutdown")
)
Functions ¶
This section is empty.
Types ¶
type ClientOption ¶
type ClientPool ¶
type ClientPool struct {
// contains filtered or unexported fields
}
func NewClientPoolWithOption ¶
func NewClientPoolWithOption(target string, option *ClientOption) *ClientPool
func (*ClientPool) Close ¶
func (cc *ClientPool) Close()
func (*ClientPool) ConnCount ¶
func (cc *ClientPool) ConnCount() int64
func (*ClientPool) Get ¶
func (cc *ClientPool) Get() (*grpc.ClientConn, error)
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext(srv interface{}, stream grpc.ServerStream) *Context
func (*Context) AcceptTime ¶
func (*Context) FastFinish ¶
func (*Context) GetBalance ¶
func (c *Context) GetBalance() eocontext.BalanceHandler
func (*Context) GetComplete ¶
func (c *Context) GetComplete() eocontext.CompleteHandler
func (*Context) GetFinish ¶
func (c *Context) GetFinish() eocontext.FinishHandler
func (*Context) GetUpstreamHostHandler ¶
func (c *Context) GetUpstreamHostHandler() eocontext.UpstreamHostHandler
func (*Context) InsecureCertificateVerify ¶
func (*Context) IsCloneable ¶ added in v0.12.1
func (*Context) Proxy ¶
func (c *Context) Proxy() grpc_context.IRequest
func (*Context) Request ¶
func (c *Context) Request() grpc_context.IRequest
func (*Context) Response ¶
func (c *Context) Response() grpc_context.IResponse
func (*Context) SetBalance ¶
func (c *Context) SetBalance(handler eocontext.BalanceHandler)
func (*Context) SetCompleteHandler ¶
func (c *Context) SetCompleteHandler(handler eocontext.CompleteHandler)
func (*Context) SetFinish ¶
func (c *Context) SetFinish(handler eocontext.FinishHandler)
func (*Context) SetResponse ¶
func (c *Context) SetResponse(response grpc_context.IResponse)
func (*Context) SetUpstreamHostHandler ¶
func (c *Context) SetUpstreamHostHandler(handler eocontext.UpstreamHostHandler)
type IClient ¶
type IClient interface { Get(target string, isTls bool, host ...string) IClientPool Close() }
type IClientPool ¶
type IClientPool interface { Get() (*grpc.ClientConn, error) ConnCount() int64 Close() }
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
func NewRequest ¶
func NewRequest(stream grpc.ServerStream) *Request
func (*Request) FullMethodName ¶
func (*Request) Message ¶
func (r *Request) Message(msgDesc *desc.MessageDescriptor) *dynamic.Message
func (*Request) SetService ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func NewResponse ¶
func NewResponse() *Response
Click to show internal directories.
Click to hide internal directories.