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 environment is unhealthy due to not receiving any type of communication from the environment

Functions

This section is empty.

Types

type FakeService

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

func (*FakeService) GetConfig

func (fake *FakeService) GetConfig(string) (*core.EnvironmentConfig, error)

func (*FakeService) GetStatus

func (fake *FakeService) GetStatus(envName string) (*core.EnvironmentStatus, error)

func (*FakeService) Ping

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

func (*FakeService) SetConfig

func (fake *FakeService) SetConfig(string, *core.EnvironmentConfig) error

func (*FakeService) ValidateDeployable

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

type Service

type Service interface {
	// Ping "pings" an environment, signaling that the environment 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 environment has not yet been provisioned this will automatically create the environment (this may change in the future)
	Ping(envName string) error
	GetConfig(envName string) (*core.EnvironmentConfig, error)
	SetConfig(envName string, environment *core.EnvironmentConfig) error
	GetStatus(envName string) (*core.EnvironmentStatus, error)
	ValidateDeployable(envName string) error
}

func NewService

func NewService(environments core.EnvironmentRepository) Service