config

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RunningState    = "running"
	NotRunningState = "not_running"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager - configuration manager for the service

func NewManager

func NewManager(configFile string) (*Manager, error)

NewManager - create a new config. There should only be one config for the service.

func (*Manager) Close

func (manager *Manager) Close()

Close - to close out the channel for this object. This should only be called when the service is being shutdown

func (*Manager) GetProjectUpdateStage

func (manager *Manager) GetProjectUpdateStage() ProjectUpdateStage

GetProjectUpdateStage - get the project update stage

func (*Manager) UpdateProjectUpdateStage

func (manager *Manager) UpdateProjectUpdateStage(projectUpdateStage ProjectUpdateStage) error

UpdateProjectUpdateStage - update the project update stage

type ProjectUpdateDomainService

type ProjectUpdateDomainService struct {
	Name                   string    `toml:"name"`
	PercentageComplete     float64   `toml:"percentage_complete"`
	EstimatedTimeCompelete time.Time `toml:"estimated_time_compelete"`
	LastUpdate             time.Time `toml:"last_update"`
	Complete               bool      `toml:"complete"`
	Failed                 bool      `toml:"failed"`
	FailureMessage         string    `toml:"failure_message"`
}

type ProjectUpdateStage

type ProjectUpdateStage struct {
	State           string                       `toml:"state"`
	ProjectUpdateID string                       `toml:"project_update_id"`
	DomainServices  []ProjectUpdateDomainService `toml:"domain_services"`
	FailureMessage  string                       `toml:"failure_message"`
	Failed          bool                         `toml:"failed"`
}

ProjectUpdateStage - the config for project updating The stage is all the data that needs to be remembered if the service is restarted.

func (ProjectUpdateStage) AreDomainServicesComplete

func (stage ProjectUpdateStage) AreDomainServicesComplete() bool

func (ProjectUpdateStage) Copy

func (ProjectUpdateStage) Equal

func (stage1 ProjectUpdateStage) Equal(stage2 ProjectUpdateStage) bool

func (ProjectUpdateStage) FindDomainServiceIndex

func (stage ProjectUpdateStage) FindDomainServiceIndex(producerID string) (int, error)

func (ProjectUpdateStage) HasFailedDomainService

func (stage ProjectUpdateStage) HasFailedDomainService() bool

func (ProjectUpdateStage) OldestDomainServiceUpdateTime

func (stage ProjectUpdateStage) OldestDomainServiceUpdateTime() time.Time

func (ProjectUpdateStage) StartRunning

func (stage ProjectUpdateStage) StartRunning(projectUpdateID string) ProjectUpdateStage

func (ProjectUpdateStage) StopRunning

func (stage ProjectUpdateStage) StopRunning() ProjectUpdateStage

Jump to

Keyboard shortcuts

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