plugins

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

README

Plugins

Gloo's configuration language is highly extensible through the use of plugins. Here you will find the source files for the Gloo plugins maintained by the core Gloo development team. Developers who wish to write their own plugins can look here for examples of where to start.

Plugin-specific APIs and detailed documentation can be found in our documentation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(plugin TranslatorPlugin)

Types

type ClusterGeneratorPlugin

type ClusterGeneratorPlugin interface {
	TranslatorPlugin
	GeneratedClusters(params *ClusterGeneratorPluginParams) ([]*envoyapi.Cluster, error)
}

Plugins that create additional resources

type ClusterGeneratorPluginParams

type ClusterGeneratorPluginParams struct{}

Params for GeneratedClusters()

type Dependencies

type Dependencies struct {
	SecretRefs []string
	FileRefs   []string
}

type EndpointDiscoveryPlugin

type EndpointDiscoveryPlugin interface {
	UpstreamPlugin
	SetupEndpointDiscovery() (endpointdiscovery.Interface, error)
}

type EnvoyNameForUpstream

type EnvoyNameForUpstream func(upstreamName string) string

type FunctionPlugin

type FunctionPlugin interface {
	UpstreamPlugin
	// if the FunctionSpec does not belong to this plugin, return nil, nil
	// if the FunctionSpec belongs to this plugin but is not valid, return nil, err
	// if the FunctionSpec belongs to this plugin and is valid, return *Struct, nil
	ParseFunctionSpec(params *FunctionPluginParams, in v1.FunctionSpec) (*types.Struct, error)
}

type FunctionPluginParams

type FunctionPluginParams struct {
	UpstreamType string
	ServiceType  string
}

Params for ParseFunctionSpec()

type HttpFilterPlugin

type HttpFilterPlugin interface {
	TranslatorPlugin
	HttpFilters(params *HttpFilterPluginParams) []StagedHttpFilter
}

type HttpFilterPluginParams

type HttpFilterPluginParams struct {
	Listener *v1.Listener
}

Params for HttpFilters()

type ListenerFilterPlugin

type ListenerFilterPlugin interface {
	TranslatorPlugin
	ListenerFilters(params *ListenerFilterPluginParams, in *v1.Listener) ([]StagedListenerFilter, error)
}

Plugins for creating network filters for listeners

type ListenerFilterPluginParams

type ListenerFilterPluginParams struct {
	EnvoyNameForUpstream EnvoyNameForUpstream
	Config               *v1.Config
}

Params for ListenerFilters()

type PluginWithDependencies added in v0.4.2

type PluginWithDependencies interface {
	TranslatorPlugin
	GetDependencies(cfg *v1.Config) *Dependencies
}

type RoutePlugin

type RoutePlugin interface {
	TranslatorPlugin
	ProcessRoute(params *RoutePluginParams, in *v1.Route, out *envoyroute.Route) error
}

type RoutePluginParams

type RoutePluginParams struct {
	EnvoyNameForUpstream EnvoyNameForUpstream
	// some route plugins need to know about the upstream(s) they route to
	Upstreams []*v1.Upstream
}

Params for ProcessRoute()

type Stage

type Stage int
const (
	PreInAuth Stage = iota
	InAuth
	PostInAuth
	PreOutAuth
	OutAuth
)

type StagedHttpFilter

type StagedHttpFilter struct {
	HttpFilter *envoyhttp.HttpFilter
	Stage      Stage
}

type StagedListenerFilter

type StagedListenerFilter struct {
	ListenerFilter envoylistener.Filter
	Stage          Stage
}

type TranslatorPlugin

type TranslatorPlugin interface {
	Init(options bootstrap.Options) error
}

func RegisteredPlugins

func RegisteredPlugins() []TranslatorPlugin

type UpstreamPlugin

type UpstreamPlugin interface {
	TranslatorPlugin
	ProcessUpstream(params *UpstreamPluginParams, in *v1.Upstream, out *envoyapi.Cluster) error
}

type UpstreamPluginParams

type UpstreamPluginParams struct {
	EnvoyNameForUpstream EnvoyNameForUpstream
	Secrets              secretwatcher.SecretMap
	Files                filewatcher.Files
}

Parameters for ProcessUpstream()

type XdsCallbacks added in v0.4.2

type XdsCallbacks []server.Callbacks

func (XdsCallbacks) OnFetchRequest added in v0.4.2

func (ps XdsCallbacks) OnFetchRequest(a *envoyapi.DiscoveryRequest)

func (XdsCallbacks) OnFetchResponse added in v0.4.2

func (XdsCallbacks) OnStreamClosed added in v0.4.2

func (ps XdsCallbacks) OnStreamClosed(a int64)

func (XdsCallbacks) OnStreamOpen added in v0.4.2

func (ps XdsCallbacks) OnStreamOpen(a int64, b string)

func (XdsCallbacks) OnStreamRequest added in v0.4.2

func (ps XdsCallbacks) OnStreamRequest(a int64, b *envoyapi.DiscoveryRequest)

func (XdsCallbacks) OnStreamResponse added in v0.4.2

func (ps XdsCallbacks) OnStreamResponse(a int64, b *envoyapi.DiscoveryRequest, c *envoyapi.DiscoveryResponse)

type XdsPlugin added in v0.4.2

type XdsPlugin interface {
	Callbacks() server.Callbacks
}

Directories

Path Synopsis
Package aws is a generated protocol buffer package.
Package aws is a generated protocol buffer package.
Package azure is a generated protocol buffer package.
Package azure is a generated protocol buffer package.
common
transformation
Package transformation is a generated protocol buffer package.
Package transformation is a generated protocol buffer package.
Package connect is a generated protocol buffer package.
Package connect is a generated protocol buffer package.
Package consul is a generated protocol buffer package.
Package consul is a generated protocol buffer package.
Package google is a generated protocol buffer package.
Package google is a generated protocol buffer package.
Package grpc is a generated protocol buffer package.
Package grpc is a generated protocol buffer package.
Package knative is a generated protocol buffer package.
Package knative is a generated protocol buffer package.
Package kubernetes is a generated protocol buffer package.
Package kubernetes is a generated protocol buffer package.
Package nats is a generated protocol buffer package.
Package nats is a generated protocol buffer package.
Package rest is a generated protocol buffer package.
Package rest is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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