Documentation
¶
Index ¶
- type CombinedSpawner
- func (cb *CombinedSpawner) Create(ctx context.Context, rd models.RepoRevisionData) (string, error)
- func (cb *CombinedSpawner) Destroy(ctx context.Context, rd models.RepoRevisionData, reason models.QADestroyReason) error
- func (cb *CombinedSpawner) DestroyExplicitly(ctx context.Context, qa *models.QAEnvironment, reason models.QADestroyReason) error
- func (cb *CombinedSpawner) Failure(ctx context.Context, name string, msg string) error
- func (cb *CombinedSpawner) Success(ctx context.Context, name string) error
- func (cb *CombinedSpawner) Update(ctx context.Context, rd models.RepoRevisionData) (string, error)
- type FakeNewRelicApplication
- func (fnra FakeNewRelicApplication) RecordCustomEvent(eventType string, params map[string]interface{}) error
- func (fnra FakeNewRelicApplication) Shutdown(timeout time.Duration)
- func (fnra FakeNewRelicApplication) StartTransaction(name string, w http.ResponseWriter, r *http.Request) newrelic.Transaction
- func (fnra FakeNewRelicApplication) WaitForConnection(timeout time.Duration) error
- type FakeNewRelicTransaction
- func (fnrt FakeNewRelicTransaction) AddAttribute(key string, value interface{}) error
- func (fnrt FakeNewRelicTransaction) End() error
- func (fnrt FakeNewRelicTransaction) Header() http.Header
- func (fnrt FakeNewRelicTransaction) Ignore() error
- func (fnrt FakeNewRelicTransaction) NoticeError(err error) error
- func (fnrt FakeNewRelicTransaction) SetName(name string) error
- func (fnrt FakeNewRelicTransaction) StartSegmentNow() newrelic.SegmentStartTime
- func (fnrt FakeNewRelicTransaction) Write(b []byte) (int, error)
- func (fnrt FakeNewRelicTransaction) WriteHeader(n int)
- type LogFunc
- type Manager
- func (m *Manager) Create(ctx context.Context, rd models.RepoRevisionData) (string, error)
- func (m *Manager) Delete(ctx context.Context, rd *models.RepoRevisionData, ...) error
- func (m *Manager) Destroy(ctx context.Context, rd models.RepoRevisionData, reason models.QADestroyReason) error
- func (m *Manager) DestroyExplicitly(ctx context.Context, qa *models.QAEnvironment, reason models.QADestroyReason) error
- func (m *Manager) Failure(context.Context, string, string) error
- func (m *Manager) InitFailureTemplate(tmpldata []byte) error
- func (m *Manager) Success(context.Context, string) error
- func (m *Manager) Update(ctx context.Context, rd models.RepoRevisionData) (string, error)
- type NotificationsFactoryFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
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 (cb *CombinedSpawner) Create(ctx context.Context, rd models.RepoRevisionData) (string, error)
func (*CombinedSpawner) Destroy ¶
func (cb *CombinedSpawner) Destroy(ctx context.Context, rd models.RepoRevisionData, reason models.QADestroyReason) error
func (*CombinedSpawner) DestroyExplicitly ¶
func (cb *CombinedSpawner) DestroyExplicitly(ctx context.Context, qa *models.QAEnvironment, reason models.QADestroyReason) error
func (*CombinedSpawner) Success ¶
func (cb *CombinedSpawner) Success(ctx context.Context, name string) error
func (*CombinedSpawner) Update ¶
func (cb *CombinedSpawner) Update(ctx context.Context, rd models.RepoRevisionData) (string, error)
type FakeNewRelicApplication ¶
type FakeNewRelicApplication struct {
}
FakeNewRelicApplication conforms to the newrelic.Application interface but does nothing
func (FakeNewRelicApplication) RecordCustomEvent ¶
func (fnra FakeNewRelicApplication) RecordCustomEvent(eventType string, params map[string]interface{}) error
func (FakeNewRelicApplication) Shutdown ¶
func (fnra FakeNewRelicApplication) Shutdown(timeout time.Duration)
func (FakeNewRelicApplication) StartTransaction ¶
func (fnra FakeNewRelicApplication) StartTransaction(name string, w http.ResponseWriter, r *http.Request) newrelic.Transaction
func (FakeNewRelicApplication) WaitForConnection ¶
func (fnra FakeNewRelicApplication) WaitForConnection(timeout time.Duration) error
type FakeNewRelicTransaction ¶
type FakeNewRelicTransaction struct {
}
FakeNewRelicTransaction conforms to the newrelic.Transaction interface but does nothing
func (FakeNewRelicTransaction) AddAttribute ¶
func (fnrt FakeNewRelicTransaction) AddAttribute(key string, value interface{}) error
func (FakeNewRelicTransaction) End ¶
func (fnrt FakeNewRelicTransaction) End() error
func (FakeNewRelicTransaction) Header ¶
func (fnrt FakeNewRelicTransaction) Header() http.Header
func (FakeNewRelicTransaction) Ignore ¶
func (fnrt FakeNewRelicTransaction) Ignore() error
func (FakeNewRelicTransaction) NoticeError ¶
func (fnrt FakeNewRelicTransaction) NoticeError(err error) error
func (FakeNewRelicTransaction) SetName ¶
func (fnrt FakeNewRelicTransaction) SetName(name string) error
func (FakeNewRelicTransaction) StartSegmentNow ¶
func (fnrt FakeNewRelicTransaction) StartSegmentNow() newrelic.SegmentStartTime
func (FakeNewRelicTransaction) Write ¶
func (fnrt FakeNewRelicTransaction) Write(b []byte) (int, error)
func (FakeNewRelicTransaction) WriteHeader ¶
func (fnrt FakeNewRelicTransaction) WriteHeader(n int)
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
NRApp newrelic.Application
FS billy.Filesystem
MG meta.Getter
CI metahelm.Installer
AWSCreds config.AWSCreds
S3Config config.S3Config
// contains filtered or unexported fields
}
Manager is an object that creates/updates/deletes environments in k8s
func (*Manager) Create ¶
Create creates a new k8s environment, persists the information to the DB and returns the environment name or error
func (*Manager) Delete ¶
func (m *Manager) Delete(ctx context.Context, rd *models.RepoRevisionData, reason models.QADestroyReason) error
Delete destroys an environment in k8s and marks it as such in the DB
func (*Manager) Destroy ¶
func (m *Manager) Destroy(ctx context.Context, rd models.RepoRevisionData, reason models.QADestroyReason) error
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) InitFailureTemplate ¶
InitFailureTemplate parses the raw temlate data from tmpldata and initializes the S3 client for later use
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