proxy_factory

package
v3.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultProxyFactory

func NewDefaultProxyFactory(_ ...proxy.Option) proxy.ProxyFactory

NewDefaultProxyFactory returns a proxy factory instance

func NewPassThroughProxyFactory

func NewPassThroughProxyFactory(_ ...proxy.Option) proxy.ProxyFactory

NewPassThroughProxyFactory returns a proxy factory instance

Types

type DefaultProxyFactory

type DefaultProxyFactory struct {
}

DefaultProxyFactory is the default proxy factory

func (*DefaultProxyFactory) GetAsyncProxy

func (factory *DefaultProxyFactory) GetAsyncProxy(invoker protocol.Invoker, callBack interface{}, url *common.URL) *proxy.Proxy

GetAsyncProxy gets a async proxy

func (*DefaultProxyFactory) GetInvoker

func (factory *DefaultProxyFactory) GetInvoker(url *common.URL) protocol.Invoker

GetInvoker gets a invoker

func (*DefaultProxyFactory) GetProxy

func (factory *DefaultProxyFactory) GetProxy(invoker protocol.Invoker, url *common.URL) *proxy.Proxy

GetProxy gets a proxy

type PassThroughProxyFactory

type PassThroughProxyFactory struct {
}

PassThroughProxyFactory is the factory of PassThroughProxyInvoker

func (*PassThroughProxyFactory) GetAsyncProxy

func (factory *PassThroughProxyFactory) GetAsyncProxy(invoker protocol.Invoker, callBack interface{}, url *common.URL) *proxy.Proxy

GetAsyncProxy gets a async proxy

func (*PassThroughProxyFactory) GetInvoker

func (factory *PassThroughProxyFactory) GetInvoker(url *common.URL) protocol.Invoker

GetInvoker gets a invoker

func (*PassThroughProxyFactory) GetProxy

func (factory *PassThroughProxyFactory) GetProxy(invoker protocol.Invoker, url *common.URL) *proxy.Proxy

GetProxy gets a proxy

type PassThroughProxyInvoker

type PassThroughProxyInvoker struct {
	*ProxyInvoker
}

PassThroughProxyInvoker is a invoker struct, it calls service with specific method 'Serivce' and params: Service(method string, argsTypes []string, args [][]byte, attachment map[string]interface{}) PassThroughProxyInvoker pass through raw invocation data and method name to service, which will deal with them.

func (*PassThroughProxyInvoker) Invoke

Invoke is used to call service method by invocation

type ProxyInvoker

type ProxyInvoker struct {
	protocol.BaseInvoker
}

ProxyInvoker is a invoker struct

func (*ProxyInvoker) Invoke

func (pi *ProxyInvoker) Invoke(ctx context.Context, invocation protocol.Invocation) protocol.Result

Invoke is used to call service method by invocation

Jump to

Keyboard shortcuts

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