Documentation ¶
Index ¶
- Constants
- Variables
- type ClientMessageSender
- type GettyClientSessionManager
- func (sessionManager *GettyClientSessionManager) AcquireGettySession() getty.Session
- func (sessionManager *GettyClientSessionManager) AcquireGettySessionByServerAddress(serverAddress string) getty.Session
- func (sessionManager *GettyClientSessionManager) RegisterGettySession(session getty.Session)
- func (sessionManager *GettyClientSessionManager) ReleaseGettySession(session getty.Session)
- type RpcRMMessage
- type RpcRemoteClient
- func (client *RpcRemoteClient) OnClose(session getty.Session)
- func (client *RpcRemoteClient) OnCron(session getty.Session)
- func (client *RpcRemoteClient) OnError(session getty.Session, err error)
- func (client *RpcRemoteClient) OnMessage(session getty.Session, pkg interface{})
- func (client *RpcRemoteClient) OnOpen(session getty.Session) error
- func (client *RpcRemoteClient) RegisterResource(serverAddress string, request protocal.RegisterRMRequest)
- func (client *RpcRemoteClient) SendMsgWithResponse(msg interface{}) (interface{}, error)
- func (client *RpcRemoteClient) SendMsgWithResponseAndTimeout(msg interface{}, timeout time.Duration) (interface{}, error)
- func (client *RpcRemoteClient) SendResponse(request protocal.RpcMessage, serverAddress string, msg interface{})
Constants ¶
View Source
const (
RPC_REQUEST_TIMEOUT = 30 * time.Second
)
Variables ¶
View Source
var ( MAX_CHECK_ALIVE_RETRY = 600 CHECK_ALIVE_INTERNAL = 100 )
Functions ¶
This section is empty.
Types ¶
type ClientMessageSender ¶
type ClientMessageSender interface { // Send msg with response object. SendMsgWithResponse(msg interface{}) (interface{}, error) // Send msg with response object. SendMsgWithResponseAndTimeout(msg interface{}, timeout time.Duration) (interface{}, error) // Send response. SendResponse(request protocal.RpcMessage, serverAddress string, msg interface{}) }
type GettyClientSessionManager ¶
type GettyClientSessionManager struct{}
func (*GettyClientSessionManager) AcquireGettySession ¶
func (sessionManager *GettyClientSessionManager) AcquireGettySession() getty.Session
func (*GettyClientSessionManager) AcquireGettySessionByServerAddress ¶
func (sessionManager *GettyClientSessionManager) AcquireGettySessionByServerAddress(serverAddress string) getty.Session
func (*GettyClientSessionManager) RegisterGettySession ¶
func (sessionManager *GettyClientSessionManager) RegisterGettySession(session getty.Session)
func (*GettyClientSessionManager) ReleaseGettySession ¶
func (sessionManager *GettyClientSessionManager) ReleaseGettySession(session getty.Session)
type RpcRMMessage ¶
type RpcRMMessage struct { RpcMessage protocal.RpcMessage ServerAddress string }
type RpcRemoteClient ¶
type RpcRemoteClient struct { BranchCommitRequestChannel chan RpcRMMessage BranchRollbackRequestChannel chan RpcRMMessage GettySessionOnOpenChannel chan string // contains filtered or unexported fields }
func GetRpcRemoteClient ¶
func GetRpcRemoteClient() *RpcRemoteClient
func InitRpcRemoteClient ¶
func InitRpcRemoteClient() *RpcRemoteClient
func (*RpcRemoteClient) OnClose ¶
func (client *RpcRemoteClient) OnClose(session getty.Session)
OnClose ...
func (*RpcRemoteClient) OnCron ¶
func (client *RpcRemoteClient) OnCron(session getty.Session)
OnCron ...
func (*RpcRemoteClient) OnError ¶
func (client *RpcRemoteClient) OnError(session getty.Session, err error)
OnError ...
func (*RpcRemoteClient) OnMessage ¶
func (client *RpcRemoteClient) OnMessage(session getty.Session, pkg interface{})
OnMessage ...
func (*RpcRemoteClient) OnOpen ¶
func (client *RpcRemoteClient) OnOpen(session getty.Session) error
OnOpen ...
func (*RpcRemoteClient) RegisterResource ¶
func (client *RpcRemoteClient) RegisterResource(serverAddress string, request protocal.RegisterRMRequest)
func (*RpcRemoteClient) SendMsgWithResponse ¶
func (client *RpcRemoteClient) SendMsgWithResponse(msg interface{}) (interface{}, error)
************************************* ClientMessageSender *************************************
func (*RpcRemoteClient) SendMsgWithResponseAndTimeout ¶
func (client *RpcRemoteClient) SendMsgWithResponseAndTimeout(msg interface{}, timeout time.Duration) (interface{}, error)
func (*RpcRemoteClient) SendResponse ¶
func (client *RpcRemoteClient) SendResponse(request protocal.RpcMessage, serverAddress string, msg interface{})
Click to show internal directories.
Click to hide internal directories.