Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewClientContext ¶
func NewClientContext(ctx context.Context, info ClientInfo) context.Context
func NewServerContext ¶
func NewServerContext(ctx context.Context, info ServerInfo) context.Context
Types ¶
type CallOption ¶
type CallOption func(o *options)
type Client ¶
type Client interface { Use(selector string, mws ...middleware.Middleware) //Invoke(ctx context.Context, method string, req interface{}, resp interface{}, opts ...CallOption) error Close() error }
Client is a transport client interface.
type ClientInfo ¶
func FromClientContext ¶
func FromClientContext(ctx context.Context) (info ClientInfo, ok bool)
type ErrorConverter ¶
type ErrorConverter interface { // FromRPCError converts RPC error to a transport error. FromRPCError(err error) error // ToRPCError converts ngo error to rpc error. ToRPCError(err error) error }
ErrorConverter .
type Server ¶
type Server interface { Use(selector string, mws ...middleware.Middleware) Start() error Healthz(ctx context.Context) bool Online(ctx context.Context) error Offline(ctx context.Context) error Stop() GracefulStop() }
Server is a transport server interface.
type ServerInfo ¶
func FromServerContext ¶
func FromServerContext(ctx context.Context) (info ServerInfo, ok bool)
Click to show internal directories.
Click to hide internal directories.