manager

package
v0.7.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseVersion

func ParseVersion(ver string) (*semver.Version, error)

func ProcessVersionConsensus

func ProcessVersionConsensus(nodes []core.Node) error

func StringVersion

func StringVersion(ver *semver.Version) string

func Verify

func Verify(key string) bool

Types

type Feature

type Feature struct {
	Key          string
	StartVersion *semver.Version
	Description  string
}

func NewFeature

func NewFeature(key string, startVersion string, description string) (*Feature, error)

type VersionManager

type VersionManager struct {
	VersionTable  map[string]*Feature
	AgreedVersion *semver.Version
	// contains filtered or unexported fields
}

func GetVersionManager

func GetVersionManager() (*VersionManager, error)

func NewVersionManager

func NewVersionManager(cfg configuration.VersionManager) (*VersionManager, error)

func (*VersionManager) Add

func (vm *VersionManager) Add(key string, startVersion string, description string) (*Feature, error)

func (*VersionManager) Get

func (vm *VersionManager) Get(key string) *Feature

func (*VersionManager) IsAvailable

func (vm *VersionManager) IsAvailable(key string) bool

func (*VersionManager) Load

func (vm *VersionManager) Load() error

func (*VersionManager) LoadFromFile

func (vm *VersionManager) LoadFromFile(path string) error

LoadFromFile method reads configuration from particular file path

func (*VersionManager) Remove

func (vm *VersionManager) Remove(key string)

func (*VersionManager) Save

func (vm *VersionManager) Save() error

Save method writes configuration to default file path

func (*VersionManager) SaveAs

func (vm *VersionManager) SaveAs(path string) error

SaveAs method writes configuration to particular file path

func (*VersionManager) Start

func (vm *VersionManager) Start(ctx context.Context) error

type VersionTable

type VersionTable struct {
	Vt map[string]*Feature
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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