Documentation ¶
Index ¶
- type ClientDetectionRequestHandler
- type ConnectResetRequestHandler
- type Connection
- type ConnectionEvent
- type ConnectionStatus
- type ConnectionType
- type GrpcClient
- type GrpcConnection
- type IConnection
- type IConnectionEventListener
- type IRpcClient
- type IServerRequestHandler
- type NamingPushRequestHandler
- type ReconnectContext
- type RpcClient
- func (r *RpcClient) GetRpcClient() *RpcClient
- func (r *RpcClient) IsInitialized() bool
- func (r *RpcClient) IsRunning() bool
- func (r *RpcClient) RegisterConnectionListener(listener IConnectionEventListener)
- func (r *RpcClient) RegisterServerRequestHandler(request func() rpc_request2.IRequest, handler IServerRequestHandler)
- func (r *RpcClient) Request(request rpc_request2.IRequest, timeoutMills int64) (rpc_response2.IResponse, error)
- func (r *RpcClient) Shutdown()
- func (r *RpcClient) Start()
- type RpcClientStatus
- type ServerInfo
- type ServerRequestHandlerMapping
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientDetectionRequestHandler ¶
type ClientDetectionRequestHandler struct { }
func (*ClientDetectionRequestHandler) Name ¶
func (c *ClientDetectionRequestHandler) Name() string
func (*ClientDetectionRequestHandler) RequestReply ¶
func (c *ClientDetectionRequestHandler) RequestReply(request rpc_request2.IRequest, rpcClient *RpcClient) rpc_response2.IResponse
type ConnectResetRequestHandler ¶
type ConnectResetRequestHandler struct { }
func (*ConnectResetRequestHandler) Name ¶
func (c *ConnectResetRequestHandler) Name() string
func (*ConnectResetRequestHandler) RequestReply ¶
func (c *ConnectResetRequestHandler) RequestReply(request rpc_request2.IRequest, rpcClient *RpcClient) rpc_response2.IResponse
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
type ConnectionEvent ¶
type ConnectionEvent struct {
// contains filtered or unexported fields
}
type ConnectionStatus ¶
type ConnectionStatus uint32
const ( DISCONNECTED ConnectionStatus = iota CONNECTED )
type GrpcClient ¶
type GrpcClient struct {
*RpcClient
}
func NewGrpcClient ¶
func NewGrpcClient(clientName string, nacosServer *nacos_server2.NacosServer) *GrpcClient
type GrpcConnection ¶
type GrpcConnection struct { *Connection // contains filtered or unexported fields }
func NewGrpcConnection ¶
func NewGrpcConnection(serverInfo ServerInfo, connectionId string, conn *grpc.ClientConn, client grpc2.RequestClient, biStreamClient grpc2.BiRequestStream_RequestBiStreamClient) *GrpcConnection
type IConnection ¶
type IConnection interface {
// contains filtered or unexported methods
}
type IConnectionEventListener ¶
type IConnectionEventListener interface { //notify when connected to server. OnConnected() //notify when disconnected to server. OnDisConnect() }
type IRpcClient ¶
type IRpcClient interface { GetRpcClient() *RpcClient // contains filtered or unexported methods }
func CreateClient ¶
func CreateClient(clientName string, connectionType ConnectionType, labels map[string]string, nacosServer *nacos_server2.NacosServer) (IRpcClient, error)
type IServerRequestHandler ¶
type IServerRequestHandler interface { Name() string //RequestReply Handle request from server. RequestReply(request rpc_request2.IRequest, rpcClient *RpcClient) rpc_response2.IResponse }
IServerRequestHandler to process the request from server side.
type NamingPushRequestHandler ¶
type NamingPushRequestHandler struct {
ServiceInfoHolder *naming_cache2.ServiceInfoHolder
}
func (*NamingPushRequestHandler) Name ¶
func (*NamingPushRequestHandler) Name() string
func (*NamingPushRequestHandler) RequestReply ¶
func (c *NamingPushRequestHandler) RequestReply(request rpc_request2.IRequest, rpcClient *RpcClient) rpc_response2.IResponse
type ReconnectContext ¶
type ReconnectContext struct {
// contains filtered or unexported fields
}
type RpcClient ¶
func (*RpcClient) GetRpcClient ¶
func (*RpcClient) IsInitialized ¶
func (*RpcClient) RegisterConnectionListener ¶
func (r *RpcClient) RegisterConnectionListener(listener IConnectionEventListener)
func (*RpcClient) RegisterServerRequestHandler ¶
func (r *RpcClient) RegisterServerRequestHandler(request func() rpc_request2.IRequest, handler IServerRequestHandler)
func (*RpcClient) Request ¶
func (r *RpcClient) Request(request rpc_request2.IRequest, timeoutMills int64) (rpc_response2.IResponse, error)
type RpcClientStatus ¶
type RpcClientStatus int32
const ( INITIALIZED RpcClientStatus = iota STARTING UNHEALTHY RUNNING SHUTDOWN )
type ServerInfo ¶
type ServerInfo struct {
// contains filtered or unexported fields
}
type ServerRequestHandlerMapping ¶
type ServerRequestHandlerMapping struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.