rpc_client

package
v0.0.0-...-fe3505f Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

* Copyright 1999-2020 Xgrpc Holding Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLimited

func IsLimited(checkKey string) bool

IsLimited return true when request is limited

Types

type IRpcClientManager

type IRpcClientManager interface {
	Request(rpcClient *rpc.RpcClient, request rpc_request.IRequest, timeoutMills uint64) (rpc_response.IResponse, error)
	CreateRpcClient(taskId string, labels map[string]string, serverRequestHandlers map[rpc.IServerRequestHandler]func() rpc_request.IRequest) *rpc.RpcClient
	GetRpcClient(labels map[string]string, serverRequestHandlers map[rpc.IServerRequestHandler]func() rpc_request.IRequest) *rpc.RpcClient
	Close(rpcClient *rpc.RpcClient)
}

func NewRpcClientManager

func NewRpcClientManager(serverConfig []constant.ServerConfig, clientConfig constant.ClientConfig, httpAgent http_agent.IHttpAgent) (IRpcClientManager, error)

type RpcClientManager

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

func (*RpcClientManager) Close

func (cp *RpcClientManager) Close(rpcClient *rpc.RpcClient)

func (*RpcClientManager) CreateRpcClient

func (cp *RpcClientManager) CreateRpcClient(taskId string, labels map[string]string, serverRequestHandlers map[rpc.IServerRequestHandler]func() rpc_request.IRequest) *rpc.RpcClient

func (*RpcClientManager) GetRpcClient

func (cp *RpcClientManager) GetRpcClient(labels map[string]string, serverRequestHandlers map[rpc.IServerRequestHandler]func() rpc_request.IRequest) *rpc.RpcClient

func (*RpcClientManager) Request

func (cp *RpcClientManager) Request(rpcClient *rpc.RpcClient, request rpc_request.IRequest, timeoutMills uint64) (rpc_response.IResponse, error)

Jump to

Keyboard shortcuts

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