provider

package
v1.6.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterSource

func RegisterSource(s SourceFactory)

RegisterSource register module

func RegisterTarget

func RegisterTarget(t TargetFactory)

RegisterSource register module

Types

type Source

type Source interface {
	Name() string
	RegisterListener(handle listener.Handle) error
	UnregisterListener()
	Forward(Target, interface{}) (interface{}, error)
}

type SourceFactory

type SourceFactory interface {
	Type() string
	GetSource(ep *v1.RuleEndpoint, sourceResource map[string]string) Source
}

func GetSourceFactory

func GetSourceFactory(name string) (SourceFactory, bool)

get source map

type Target

type Target interface {
	Name() string
	GoToTarget(data map[string]interface{}, stop chan struct{}) (interface{}, error)
}

type TargetFactory

type TargetFactory interface {
	Type() string
	GetTarget(ep *v1.RuleEndpoint, targetResource map[string]string) Target
}

func GetTargetFactory

func GetTargetFactory(name string) (TargetFactory, bool)

get source map

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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