baserpc

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRpc

type BaseRpc struct {
	Timeout    time.Duration
	RetryTimes uint32
}

func (*BaseRpc) SendRpc

func (cli *BaseRpc) SendRpc(ctx *RpcContext, rpcFunc Rpc) *RpcResult

type Rpc

type Rpc interface {
	NewRpcClient(cc grpc.ClientConnInterface)
	Stub_Func(ctx context.Context, opt ...grpc.CallOption) (interface{}, error)
}

type RpcContext

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

func NewRpcContext

func NewRpcContext(addrs []string, funcName string) *RpcContext

type RpcResult

type RpcResult struct {
	Key    interface{}
	Err    error
	Result interface{}
}

Jump to

Keyboard shortcuts

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