rpc

package
v0.0.0-...-c202456 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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 (*ClientDetectionRequestHandler) RequestReply

type ConnectResetRequestHandler

type ConnectResetRequestHandler struct {
}

func (*ConnectResetRequestHandler) Name

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 ConnectionType

type ConnectionType uint32
const (
	GRPC ConnectionType = iota
)

type GrpcClient

type GrpcClient struct {
	*RpcClient
}

func NewGrpcClient

func NewGrpcClient(ctx context.Context, clientName string, nacosServer *nacos_server.NacosServer) *GrpcClient

type GrpcConnection

type GrpcConnection struct {
	*Connection
	// contains filtered or unexported fields
}

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(ctx context.Context, clientName string, connectionType ConnectionType, labels map[string]string, nacosServer *nacos_server.NacosServer) (IRpcClient, error)

type IServerRequestHandler

type IServerRequestHandler interface {
	Name() string
	//RequestReply Handle request from server.
	RequestReply(request rpc_request.IRequest, rpcClient *RpcClient) rpc_response.IResponse
}

IServerRequestHandler to process the request from server side.

type NamingPushRequestHandler

type NamingPushRequestHandler struct {
	ServiceInfoHolder *naming_cache.ServiceInfoHolder
}

func (*NamingPushRequestHandler) Name

func (*NamingPushRequestHandler) RequestReply

type ReconnectContext

type ReconnectContext struct {
	// contains filtered or unexported fields
}

type RpcClient

type RpcClient struct {
	Tenant string
	// contains filtered or unexported fields
}

func (*RpcClient) GetRpcClient

func (r *RpcClient) GetRpcClient() *RpcClient

func (*RpcClient) IsInitialized

func (r *RpcClient) IsInitialized() bool

func (*RpcClient) IsRunning

func (r *RpcClient) IsRunning() bool

IsRunning check is this client is running.

func (*RpcClient) Name

func (r *RpcClient) Name() string

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)

func (*RpcClient) Shutdown

func (r *RpcClient) Shutdown()

func (*RpcClient) Start

func (r *RpcClient) Start()

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL