proxy

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: 7 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 Proxy

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

It is deprecated. Use RpcClientService instead

func NewProxy

func NewProxy(opts ...Option) *Proxy

func (*Proxy) Call

func (r *Proxy) Call(servicePath string, serviceMethod string, args *rpc.Args, reply interface{}) error

func (*Proxy) Go

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

func (*Proxy) OnDestroy

func (r *Proxy) OnDestroy()

func (*Proxy) OnInit

func (r *Proxy) OnInit(s component.ServerImpl)

func (*Proxy) OnRun

func (r *Proxy) OnRun(closeSig chan bool)

func (*Proxy) SetRpcFilter

func (r *Proxy) 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