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 ¶
- func IsLimited(checkKey string) bool
- type IRpcClientManager
- type RpcClientManager
- func (cp *RpcClientManager) Close(rpcClient *rpc.RpcClient)
- func (cp *RpcClientManager) CreateRpcClient(taskId string, labels map[string]string, ...) *rpc.RpcClient
- func (cp *RpcClientManager) GetRpcClient(labels map[string]string, ...) *rpc.RpcClient
- func (cp *RpcClientManager) Request(rpcClient *rpc.RpcClient, request rpc_request.IRequest, timeoutMills uint64) (rpc_response.IResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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)
Click to show internal directories.
Click to hide internal directories.