env

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2020 License: MIT Imports: 32 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOperationTimeout = 30 * time.Minute

Functions

This section is empty.

Types

type CombinedSpawner

type CombinedSpawner struct {
	DL      persistence.DataLayer
	MG      meta.Getter
	Nitro   spawner.EnvironmentSpawner
	Spawner spawner.EnvironmentSpawner
}

CombinedSpawner is an object that uses a Nitro backend for acyl.yml versions > 1, and legacy Spawner for acyl.yml <= 1

func (*CombinedSpawner) Create

func (*CombinedSpawner) Destroy

func (*CombinedSpawner) DestroyExplicitly

func (cb *CombinedSpawner) DestroyExplicitly(ctx context.Context, qa *models.QAEnvironment, reason models.QADestroyReason) error

func (*CombinedSpawner) Failure

func (cb *CombinedSpawner) Failure(ctx context.Context, name string, msg string) error

func (*CombinedSpawner) Success

func (cb *CombinedSpawner) Success(ctx context.Context, name string) error

func (*CombinedSpawner) Update

type LogFunc

type LogFunc func(string, ...interface{})

LogFunc is a function that logs a formatted string somewhere

type Manager

type Manager struct {
	NF                   NotificationsFactoryFunc
	DefaultNotifications models.Notifications
	DL                   persistence.DataLayer
	RC                   ghclient.RepoClient
	MC                   metrics.Collector
	NG                   namegen.NameGenerator
	LP                   locker.PreemptiveLockProvider
	FS                   billy.Filesystem
	MG                   meta.Getter
	CI                   metahelm.Installer
	AWSCreds             config.AWSCreds
	S3Config             config.S3Config
	GlobalLimit          uint

	OperationTimeout time.Duration
	// contains filtered or unexported fields
}

Manager is an object that creates/updates/deletes environments in k8s

func (*Manager) Create

func (m *Manager) Create(ctx context.Context, rd models.RepoRevisionData) (string, error)

Create creates a new k8s environment, persists the information to the DB and returns the environment name or error

func (*Manager) Delete

Delete destroys an environment in k8s and marks it as such in the DB

func (*Manager) Destroy

Destroy is the same as Delete and is needed to satisfy the interface

func (*Manager) DestroyExplicitly

func (m *Manager) DestroyExplicitly(ctx context.Context, qa *models.QAEnvironment, reason models.QADestroyReason) error

DestroyExplicitly destroys an environment and is triggered by API call

func (*Manager) Failure

func (m *Manager) Failure(context.Context, string, string) error

Failure isn't used by Nitro but is needed to satisfy the interface

func (*Manager) InitFailureTemplate

func (m *Manager) InitFailureTemplate(tmpldata []byte) error

InitFailureTemplate parses the raw temlate data from tmpldata and initializes the S3 client for later use

func (*Manager) Success

func (m *Manager) Success(context.Context, string) error

Success isn't used by Nitro but is needed to satisfy the interface

func (*Manager) Update

func (m *Manager) Update(ctx context.Context, rd models.RepoRevisionData) (string, error)

Update changes an existing environment

type NotificationsFactoryFunc

type NotificationsFactoryFunc func(lf func(string, ...interface{}), notifications models.Notifications, user string) notifier.Router

NotificationsFactoryFunc is a function that takes a notifications config from the triggering repo, processes it according to any global defaults, and returns a Router suitable to push notifications

Jump to

Keyboard shortcuts

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