features

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(feature Feature)

Types

type ControllerRegister

type ControllerRegister func(ctx context.Context, rContext *types.Context) error

type Feature

type Feature interface {
	Start(ctx context.Context, feature *v1.Feature) error
	Changed(feature *v1.Feature) error
	Stop() error
	IsSystem() bool
	Spec() v1.FeatureSpec
	Name() string
}

func GetFeature

func GetFeature(name string) Feature

func GetFeatures

func GetFeatures() []Feature

type FeatureController

type FeatureController struct {
	FeatureName  string
	System       bool
	FeatureSpec  v1.FeatureSpec
	Controllers  []ControllerRegister
	OnStop       func() error
	OnChange     func(*v1.Feature) error
	OnStart      func(*v1.Feature) error
	SystemStacks []*systemstack.SystemStack
	FixedAnswers map[string]string
	// contains filtered or unexported fields
}

func (*FeatureController) Changed

func (f *FeatureController) Changed(feature *v1.Feature) error

func (*FeatureController) IsSystem

func (f *FeatureController) IsSystem() bool

func (*FeatureController) Name

func (f *FeatureController) Name() string

func (*FeatureController) Register

func (f *FeatureController) Register() error

func (*FeatureController) Spec

func (f *FeatureController) Spec() v1.FeatureSpec

func (*FeatureController) Start

func (f *FeatureController) Start(ctx context.Context, feature *v1.Feature) error

func (*FeatureController) Stop

func (f *FeatureController) Stop() error

Jump to

Keyboard shortcuts

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