proxy

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

type Proxy interface {
	//set next proxy
	NextProxy(proxy interface{})

	//get proxy name
	ProxyName() string
}

type ProxyFactory

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

func NewProxyFactory

func NewProxyFactory(options ...ProxyFactoryOption) *ProxyFactory

func (*ProxyFactory) GetFirstInstance

func (this *ProxyFactory) GetFirstInstance(realName string, realInstance interface{}, proxys ...func() interface{}) interface{}

GetFirstInstance implement init mul level proxy, RealInstance and proxys make sure both implement the same interface return firstProxy | realInstance

func (*ProxyFactory) GetInstances

func (this *ProxyFactory) GetInstances(realName string, proxys ...func() interface{}) []interface{}

type ProxyFactoryOption

type ProxyFactoryOption func(c *ProxyFactory)

type ProxyFactoryOptions

type ProxyFactoryOptions struct{}

func (ProxyFactoryOptions) WithLogger

Jump to

Keyboard shortcuts

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