environment

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 11 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 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 added in v0.0.37

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 RepoCache added in v0.0.44

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

func NewBranchPerEnvRepoCache added in v0.0.44

func NewBranchPerEnvRepoCache(settings RepoSettings) *RepoCache

func NewFakeRepoCache added in v0.0.44

func NewFakeRepoCache() *RepoCache

func (*RepoCache) GetRepo added in v0.0.44

func (cache *RepoCache) GetRepo(envName string) (git.Repo, error)

type RepoSettings added in v0.0.44

type RepoSettings struct {
	URL        string
	BaseGitDir string
}

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

Jump to

Keyboard shortcuts

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