provider

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 3 Imported by: 3

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() v1.RuleEndpointTypeDef
	GetSource(ep *v1.RuleEndpoint, sourceResource map[string]string) Source
}

func GetSourceFactory

func GetSourceFactory(name v1.RuleEndpointTypeDef) (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() v1.RuleEndpointTypeDef
	GetTarget(ep *v1.RuleEndpoint, targetResource map[string]string) Target
}

func GetTargetFactory

func GetTargetFactory(name v1.RuleEndpointTypeDef) (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