stage

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UnhealthyAfter = time.Duration(30) * time.Second

UnhealthyAfter indicates the duration that is used to calculate if the stage is "unhealthy" due to not receiving a "ping" of any kind from it

Functions

This section is empty.

Types

type FakeService

type FakeService struct {
	PingFn               func(string) error
	PingCallCount        int
	GetStatusFn          func(stageName string) (*core.StageStatus, error)
	GetStatusCallCount   int
	ValidateDeployableFn func(stageName string) error
}

func (*FakeService) GetStatus

func (fake *FakeService) GetStatus(stageName string) (*core.StageStatus, error)

func (*FakeService) Ping

func (fake *FakeService) Ping(stageName string) error

func (*FakeService) SetConfig

func (fake *FakeService) SetConfig(stageName string, stage *core.StageConfig) error

func (*FakeService) ValidateDeployable

func (fake *FakeService) ValidateDeployable(stageName string) error

type Service

type Service interface {
	// Ping "pings" a stage, signaling that the stage has received some form of update
	// This is used to help identify when a cluster is no longer reporting status to the server
	// If the stage has not yet been provisioned this will automatically create the stage (this may change in the future)
	Ping(stageName string) error
	SetConfig(stageName string, stage *core.StageConfig) error
	GetStatus(stageName string) (*core.StageStatus, error)
	ValidateDeployable(stageName string) error
}

func NewService

func NewService(stages core.StageRepository) Service

Jump to

Keyboard shortcuts

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