Documentation
¶
Index ¶
- Constants
- Variables
- func Init() error
- func InstallDestinationResolverPlugin(name string, newFunc func() DestinationResolver)
- func SetDefaultDestinationResolver(name string, dr DestinationResolver)
- type DefaultDestinationResolver
- type DefaultSourceResolver
- type DestinationResolver
- type SourceResolver
Constants ¶
const DefaultPlugin = "host"
DefaultPlugin is a constant which stores default plugin name
Variables ¶
var DestinationResolverPlugins map[string]func() DestinationResolver
DestinationResolverPlugins is a map
var ( //ErrFoo is of type error ErrFoo = errors.New("resolved as a nil service") )
var ErrUnknownResolver = errors.New("unknown Destination Resolver")
ErrUnknownResolver is of type error
var SelfEndpoint = "#To be init#"
SelfEndpoint is a string
Functions ¶
func InstallDestinationResolverPlugin ¶
func InstallDestinationResolverPlugin(name string, newFunc func() DestinationResolver)
InstallDestinationResolverPlugin function installs new plugin
func SetDefaultDestinationResolver ¶
func SetDefaultDestinationResolver(name string, dr DestinationResolver)
SetDefaultDestinationResolver set the a default implementation for a protocol, so that you don't need to set config file
Types ¶
type DefaultDestinationResolver ¶
type DefaultDestinationResolver struct { }
DefaultDestinationResolver is a struct mesher as sidecar must use DefaultDestinationResolver
type DefaultSourceResolver ¶
type DefaultSourceResolver struct { }
DefaultSourceResolver is a struct
func (*DefaultSourceResolver) Resolve ¶
func (sr *DefaultSourceResolver) Resolve(source string) *registry.SourceInfo
Resolve is a method which resolves service endpoint
type DestinationResolver ¶
type DestinationResolver interface {
Resolve(remoteIP, host, rawURI string, header map[string]string) (string, string, error)
}
DestinationResolver is a interface with Resolve method
func GetDestinationResolver ¶
func GetDestinationResolver(name string) DestinationResolver
GetDestinationResolver returns destinationResolver pointer
func New ¶
func New() DestinationResolver
New function returns new DefaultDestinationResolver struct object
type SourceResolver ¶
type SourceResolver interface {
Resolve(source string) *registry.SourceInfo
}
SourceResolver is a interface which has Resolve function
func GetSourceResolver ¶
func GetSourceResolver() SourceResolver
GetSourceResolver returns interface object