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_request.IRequest, handler IServerRequestHandler)
- func (r *RpcClient) Request(request rpc_request.IRequest, timeoutMills int64) (rpc_response.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) RequestReply ¶
func (c *ClientDetectionRequestHandler) RequestReply(request rpc_request.IRequest, rpcClient *RpcClient) rpc_response.IResponse
type ConnectResetRequestHandler ¶
type ConnectResetRequestHandler struct { }
func (*ConnectResetRequestHandler) RequestReply ¶
func (c *ConnectResetRequestHandler) RequestReply(request rpc_request.IRequest, rpcClient *RpcClient) rpc_response.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_server.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 nacos_grpc_service.RequestClient, biStreamClient nacos_grpc_service.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_server.NacosServer) (IRpcClient, error)
type IServerRequestHandler ¶
type IServerRequestHandler interface { //Handle request from server. RequestReply(request rpc_request.IRequest, rpcClient *RpcClient) rpc_response.IResponse }
ServerRequestHandler, to process the request from server side.
type NamingPushRequestHandler ¶
type NamingPushRequestHandler struct {
ServiceInfoHolder *naming_cache.ServiceInfoHolder
}
func (*NamingPushRequestHandler) RequestReply ¶
func (c *NamingPushRequestHandler) RequestReply(request rpc_request.IRequest, rpcClient *RpcClient) rpc_response.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_request.IRequest, handler IServerRequestHandler)
func (*RpcClient) Request ¶
func (r *RpcClient) Request(request rpc_request.IRequest, timeoutMills int64) (rpc_response.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.