Documentation
¶
Index ¶
- func FakeLeader(v bool) func() stack.Leadership
- func FakeScope(endpoints map[string]*plugin.Endpoint) scope.Scope
- type Scope
- func (s *Scope) Controller(name string) (controller.Controller, error)
- func (s *Scope) Flavor(name string) (flavor.Plugin, error)
- func (s *Scope) Group(name string) (group.Plugin, error)
- func (s *Scope) Instance(name string) (instance.Plugin, error)
- func (s *Scope) L4(name string) (loadbalancer.L4, error)
- func (s *Scope) Metadata(path string) (*scope.MetadataCall, error)
- func (s *Scope) Plugins() discovery.Plugins
- func (s *Scope) Stack(name string) (stack.Interface, error)
- func (s *Scope) TemplateEngine(url string, opts template.Options) (*template.Template, error)
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
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) 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
Click to show internal directories.
Click to hide internal directories.