proxy

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(ProxyFactory)

Option will define a function of handling ProxyFactory

type Proxy

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

nolint

func NewProxy

func NewProxy(invoke protocol.Invoker, callBack interface{}, attachments map[string]string) *Proxy

NewProxy create service proxy.

func (*Proxy) Get

func (p *Proxy) Get() common.RPCService

Get gets rpc service instance.

func (*Proxy) GetCallback added in v1.3.0

func (p *Proxy) GetCallback() interface{}

GetCallback gets callback.

func (*Proxy) Implement

func (p *Proxy) Implement(v common.RPCService)

Implement proxy implement In consumer, RPCService like:

		type XxxProvider struct {
 		Yyy func(ctx context.Context, args []interface{}, rsp *Zzz) error
		}

type ProxyFactory

type ProxyFactory interface {
	GetProxy(invoker protocol.Invoker, url *common.URL) *Proxy
	GetAsyncProxy(invoker protocol.Invoker, callBack interface{}, url *common.URL) *Proxy
	GetInvoker(url *common.URL) protocol.Invoker
}

ProxyFactory interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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