Documentation ¶
Index ¶
- func OnStateChanged(disp *dispatch.Dispatcher, stateListener *dispatch.StateListener)
- type AuthorizedCallback
- type CallOption
- type CallOptionFunc
- type ConnectedCallback
- type ConnectionLostCallback
- type LiveCallback
- type LivecallT
- type MethodUpdateReceiver
- type RPCClient
- func (self *RPCClient) CallGRPCMessage(rootCtx context.Context, reqmsg jsonrpc.IMessage, opts ...CallOptionFunc) (jsonrpc.IMessage, error)
- func (self *RPCClient) CallHTTPMessage(rootCtx context.Context, reqmsg jsonrpc.IMessage, opts ...CallOptionFunc) (jsonrpc.IMessage, error)
- func (self *RPCClient) CallMessage(rootCtx context.Context, reqmsg jsonrpc.IMessage, opts ...CallOptionFunc) (jsonrpc.IMessage, error)
- func (self *RPCClient) CallRPC(rootCtx context.Context, method string, params []interface{}, ...) (jsonrpc.IMessage, error)
- func (self *RPCClient) CheckStatus(status *intf.Status, methodName string) error
- func (self RPCClient) ClientAuth() *intf.ClientAuth
- func (self *RPCClient) Connect() error
- func (self RPCClient) Connected() bool
- func (self *RPCClient) DeclareDelegates(rootCtx context.Context, methods []string) error
- func (self RPCClient) IsH2() bool
- func (self RPCClient) IsHttp() bool
- func (self RPCClient) IsSecure() bool
- func (self *RPCClient) ListDelegates(rootCtx context.Context) ([]string, error)
- func (self *RPCClient) ListMethods(rootCtx context.Context) ([]*intf.MethodInfo, error)
- func (self *RPCClient) Live(rootCtx context.Context, disp *dispatch.Dispatcher) error
- func (self *RPCClient) LiveCall(rootCtx context.Context, reqmsg *jsonrpc.RequestMessage, callback LiveCallback, ...) error
- func (self *RPCClient) NewAuthRequest() *jsonrpc.RequestMessage
- func (self *RPCClient) NewWatchStateRequest() *jsonrpc.RequestMessage
- func (self *RPCClient) OnAuthorized(cb AuthorizedCallback)
- func (self *RPCClient) OnConnected(cb ConnectedCallback)
- func (self *RPCClient) OnConnectionLost(cb ConnectionLostCallback)
- func (self *RPCClient) OnHandlerChanged(disp *dispatch.Dispatcher)
- func (self *RPCClient) SendGRPCNotify(rootCtx context.Context, method string, params []interface{}, ...) error
- func (self *RPCClient) SendHTTPNotify(rootCtx context.Context, method string, params []interface{}, ...) error
- func (self *RPCClient) SendNotify(rootCtx context.Context, method string, params []interface{}, ...) error
- func (self RPCClient) ServerEntry() ServerEntry
- func (self RPCClient) String() string
- func (self RPCClient) WebsocketUrlString() string
- type RPCRequest
- type RPCStatusError
- type ServerEntry
- type ServerFlag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnStateChanged ¶
func OnStateChanged(disp *dispatch.Dispatcher, stateListener *dispatch.StateListener)
Types ¶
type AuthorizedCallback ¶
type AuthorizedCallback func()
type CallOption ¶
type CallOption struct {
// contains filtered or unexported fields
}
type CallOptionFunc ¶
type CallOptionFunc func(opt *CallOption)
func WithBroadcast ¶
func WithBroadcast(b bool) CallOptionFunc
func WithTraceId ¶
func WithTraceId(traceId string) CallOptionFunc
type ConnectedCallback ¶
type ConnectedCallback func()
type ConnectionLostCallback ¶
type ConnectionLostCallback func()
type LiveCallback ¶
type LivecallT ¶
type LivecallT struct { Expire time.Time Request *jsonrpc.RequestMessage Callback LiveCallback }
type MethodUpdateReceiver ¶
type MethodUpdateReceiver chan []*intf.MethodInfo
type RPCClient ¶
type RPCClient struct { LiveRetryTimes int // contains filtered or unexported fields }
func NewRPCClient ¶
func NewRPCClient(serverEntry ServerEntry) *RPCClient
func (*RPCClient) CallGRPCMessage ¶
func (*RPCClient) CallHTTPMessage ¶
func (*RPCClient) CallMessage ¶
func (*RPCClient) CheckStatus ¶
func (RPCClient) ClientAuth ¶
func (self RPCClient) ClientAuth() *intf.ClientAuth
func (*RPCClient) DeclareDelegates ¶
func (*RPCClient) ListDelegates ¶
func (*RPCClient) ListMethods ¶
func (*RPCClient) LiveCall ¶
func (self *RPCClient) LiveCall(rootCtx context.Context, reqmsg *jsonrpc.RequestMessage, callback LiveCallback, opts ...CallOptionFunc) error
func (*RPCClient) NewAuthRequest ¶
func (self *RPCClient) NewAuthRequest() *jsonrpc.RequestMessage
func (*RPCClient) NewWatchStateRequest ¶
func (self *RPCClient) NewWatchStateRequest() *jsonrpc.RequestMessage
func (*RPCClient) OnAuthorized ¶
func (self *RPCClient) OnAuthorized(cb AuthorizedCallback)
func (*RPCClient) OnConnected ¶
func (self *RPCClient) OnConnected(cb ConnectedCallback)
func (*RPCClient) OnConnectionLost ¶
func (self *RPCClient) OnConnectionLost(cb ConnectionLostCallback)
func (*RPCClient) OnHandlerChanged ¶
func (self *RPCClient) OnHandlerChanged(disp *dispatch.Dispatcher)
Override Handler.OnHandlerChanged
func (*RPCClient) SendGRPCNotify ¶
func (*RPCClient) SendHTTPNotify ¶
func (*RPCClient) SendNotify ¶
func (RPCClient) ServerEntry ¶
func (self RPCClient) ServerEntry() ServerEntry
func (RPCClient) WebsocketUrlString ¶
type RPCRequest ¶
type RPCStatusError ¶
func (RPCStatusError) Error ¶
func (self RPCStatusError) Error() string
type ServerEntry ¶
type ServerFlag ¶
type ServerFlag struct {
// contains filtered or unexported fields
}
func (*ServerFlag) Get ¶
func (self *ServerFlag) Get() ServerEntry
Source Files ¶
Click to show internal directories.
Click to hide internal directories.