rpcClientService

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

func BasePath

func BasePath(s string) Option

Base path of service

func RegistryAddr

func RegistryAddr(s string) Option

Address of register service

func RegistryType

func RegistryType(s string) Option

Register service type. option is consul, etcd, etcdv3, zookeeper.

func SelectMode

func SelectMode(s string) Option

Select mode of service. options is "RandomSelect","RoundRobin","WeightedRoundRobin", "WeightedICMP","ConsistentHash","Closest".

type Options

type Options struct {
	RegistryType string
	RegistryAddr string
	BasePath     string
	SelectMode   string
}

type RpcClientService

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

func GetRpcClientService

func GetRpcClientService() *RpcClientService

func (*RpcClientService) Call

func (r *RpcClientService) Call(servicePath string, serviceMethod string, args interface{}, reply interface{}) error

func (*RpcClientService) Go

func (r *RpcClientService) Go(servicePath string, serviceMethod string, args interface{}, reply interface{}, chanRet chan *client.Call)

func (*RpcClientService) Initialize

func (r *RpcClientService) Initialize(opts ...Option)

func (*RpcClientService) SetRpcFilter

func (r *RpcClientService) SetRpcFilter(f filter.Filter)

Set a filter for rpc

Jump to

Keyboard shortcuts

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