scope

package
v0.0.0-...-3500608 Latest Latest
Warning

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

Go to latest
Published: May 14, 2018 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FakeLeader

func FakeLeader(v bool) func() stack.Leadership

FakeLeader returns a fake leadership func

func FakeScope

func FakeScope(endpoints map[string]*plugin.Endpoint) scope.Scope

FakeScope returns a fake Scope with given endpoints

Types

type Scope

type Scope struct {
	scope.Scope

	// ResolvePlugins returns the plugin lookup
	ResolvePlugins func() discovery.Plugins

	// ResolveStack returns the stack that entails this scope
	ResolveStack func(n string) (stack.Interface, error)

	// ResolveGroup is for looking up an group plugin
	ResolveGroup func(n string) (group.Plugin, error)

	// ResolveController returns the controller by name
	ResolveController func(n string) (controller.Controller, error)

	// ResolveInstance is for looking up an instance plugin
	ResolveInstance func(n string) (instance.Plugin, error)

	// ResolveFlavor is for lookup up a flavor plugin
	ResolveFlavor func(n string) (flavor.Plugin, error)

	// ResolveL4 is for lookup up an L4 plugin
	ResolveL4 func(n string) (loadbalancer.L4, error)

	// ResolveMetadata is for resolving metadata / path related queries
	ResolveMetadata func(p string) (*scope.MetadataCall, error)

	// ResolveTemplateEngine creates a template engine for use.
	ResolveTemplateEngine func(url string, opts template.Options) (*template.Template, error)
}

Scope is the testing scope for looking up components

func DefaultScope

func DefaultScope() *Scope

DefaultScope returns a default scope but customizable for different plugin lookups

func (*Scope) Controller

func (s *Scope) Controller(name string) (controller.Controller, error)

Controller returns the controller by name

func (*Scope) Flavor

func (s *Scope) Flavor(name string) (flavor.Plugin, error)

Flavor is for lookup up a flavor plugin

func (*Scope) Group

func (s *Scope) Group(name string) (group.Plugin, error)

Group is for looking up an group plugin

func (*Scope) Instance

func (s *Scope) Instance(name string) (instance.Plugin, error)

Instance is for looking up an instance plugin

func (*Scope) L4

func (s *Scope) L4(name string) (loadbalancer.L4, error)

L4 is for lookup up an L4 plugin

func (*Scope) Metadata

func (s *Scope) Metadata(path string) (*scope.MetadataCall, error)

Metadata is for resolving metadata / path related queries

func (*Scope) Plugins

func (s *Scope) Plugins() discovery.Plugins

Plugins returns the plugin lookup

func (*Scope) Stack

func (s *Scope) Stack(name string) (stack.Interface, error)

Stack returns the stack that entails this scope

func (*Scope) TemplateEngine

func (s *Scope) TemplateEngine(url string, opts template.Options) (*template.Template, error)

TemplateEngine creates a template engine for use.

Jump to

Keyboard shortcuts

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