Documentation ¶
Index ¶
- Constants
- Variables
- func GetNRTxnFromContext(ctx context.Context) (newrelic.Transaction, bool)
- func NewNRTxnContext(ctx context.Context, txn newrelic.Transaction) context.Context
- type AWSConfig
- type AWSCreds
- type AcylBackend
- type AcylContextKey
- type AminoBackend
- type AminoConfig
- type BackendConfig
- type BadSignature
- type BranchInfo
- type ChatNotifier
- type CommitStatus
- type ConsulConfig
- type DNSManager
- type DataLayer
- type EnvironmentSpawner
- type EnvironmentStatus
- type FakeEnvironmentSpawner
- func (fes *FakeEnvironmentSpawner) Create(ctx context.Context, rd models.RepoRevisionData) (string, error)
- func (fes *FakeEnvironmentSpawner) Destroy(ctx context.Context, rd models.RepoRevisionData, reason models.QADestroyReason) error
- func (fes *FakeEnvironmentSpawner) DestroyExplicitly(ctx context.Context, env *models.QAEnvironment, reason models.QADestroyReason) error
- func (fes *FakeEnvironmentSpawner) Failure(ctx context.Context, name, msg string) error
- func (fes *FakeEnvironmentSpawner) Success(ctx context.Context, name string) error
- func (fes *FakeEnvironmentSpawner) Update(ctx context.Context, rd models.RepoRevisionData) (string, error)
- type GitHubEventWebhook
- type GithubConfig
- type LockProvider
- type MetricsCollector
- type MigrateConfig
- type NameGenerator
- type OperationMetricsCollector
- type PreemptiveLockProvider
- type PreemptiveLocker
- type ProvisioningMetricsCollector
- type ProvisioningMetricsTimer
- type QADestroyReason
- type QAEnvironment
- type QAEnvironmentEvent
- type QAEnvironments
- type QASpawner
- func (qs *QASpawner) Create(ctx context.Context, rd RepoRevisionData) (string, error)
- func (qs *QASpawner) Destroy(ctx context.Context, rd RepoRevisionData, reason QADestroyReason) error
- func (qs *QASpawner) DestroyExplicitly(ctx context.Context, qa *QAEnvironment, reason QADestroyReason) error
- func (qs *QASpawner) Failure(ctx context.Context, name string, message string) error
- func (qs *QASpawner) Success(ctx context.Context, name string) error
- func (qs *QASpawner) Update(ctx context.Context, rd RepoRevisionData) (string, error)
- type QAType
- type RefMap
- type RepoClient
- type RepoRevisionData
- type SecretsConfig
- type ServerConfig
- type SlackConfig
- type VaultConfig
Constants ¶
const ( Destroyed = models.Destroyed Spawned = models.Spawned Failure = models.Failure Updating = models.Updating Success = models.Success DestroyApiRequest = models.DestroyApiRequest EnvironmentLimitExceeded = models.EnvironmentLimitExceeded ReapPrClosed = models.ReapPrClosed ReapAgeSpawned = models.ReapAgeSpawned ReapAgeFailure = models.ReapAgeFailure ReapEnvironmentLimitExceeded = models.ReapEnvironmentLimitExceeded Update = ghevent.Update CreateNew = ghevent.CreateNew Destroy = ghevent.Destroy NotRelevant = ghevent.NotRelevant )
const (
TagBranchMatchFallbackBranch = "master"
)
Variables ¶
var NewPreemptiveLocker = locker.NewPreemptiveLocker
Functions ¶
func GetNRTxnFromContext ¶
func GetNRTxnFromContext(ctx context.Context) (newrelic.Transaction, bool)
GetNRTxnFromContext returns the New Relic transaction (or nil) and a boolean indicating whether it exists
func NewNRTxnContext ¶
NewNRTxnContext returns a context with the New Relic transaction embedded as a value
Types ¶
type AcylBackend ¶
type AcylBackend interface { CreateEnvironment(ctx context.Context, qa *QAEnvironment, qat *QAType) (string, error) DestroyEnvironment(ctx context.Context, qae *QAEnvironment, dns bool) error }
AcylBackend defines the different operations that can be performed on an Acyl backend.
type AcylContextKey ¶
type AcylContextKey string // https://github.com/golang/lint/pull/245#issuecomment-255496398
type AminoBackend ¶
type AminoBackend struct {
// contains filtered or unexported fields
}
AminoBackend provides a Acyl backend that uses Amino.
func (*AminoBackend) CreateEnvironment ¶
func (a *AminoBackend) CreateEnvironment(ctx context.Context, qa *QAEnvironment, qat *QAType) (string, error)
CreateEnvironment creates a QA environment using the Amino API.
func (*AminoBackend) DestroyEnvironment ¶
func (a *AminoBackend) DestroyEnvironment(ctx context.Context, qae *QAEnvironment, dns bool) error
DestroyEnvironment destroys a Amino environment.
func (*AminoBackend) ManagesDNS ¶
func (a *AminoBackend) ManagesDNS() bool
ManagesDNS returns whether Amino manages DNS.
type AminoConfig ¶
type AminoConfig = config.AminoConfig
type BackendConfig ¶
type BackendConfig = config.BackendConfig
type BadSignature ¶
type BadSignature = ghevent.BadSignature
type BranchInfo ¶
type BranchInfo = ghclient.BranchInfo
type ChatNotifier ¶
type ChatNotifier = slacknotifier.ChatNotifier
type CommitStatus ¶
type CommitStatus = ghclient.CommitStatus
type ConsulConfig ¶
type ConsulConfig = config.ConsulConfig
type DNSManager ¶
type DNSManager interface { GetPrimaryHostname([]string, string) (string, error) CreateRecords(string, string, *QAType) error DeleteRecords(string, string, *QAType) error }
DNSManager describes an object that can create or delete DNS records
type DataLayer ¶
type DataLayer = persistence.DataLayer
type EnvironmentSpawner ¶
type EnvironmentSpawner interface { Create(context.Context, RepoRevisionData) (string, error) Update(context.Context, RepoRevisionData) (string, error) Destroy(context.Context, RepoRevisionData, QADestroyReason) error DestroyExplicitly(context.Context, *QAEnvironment, QADestroyReason) error Success(context.Context, string) error Failure(context.Context, string, string) error }
EnvironmentSpawner describes an object capable of managing environments
type EnvironmentStatus ¶
type EnvironmentStatus = models.EnvironmentStatus
type FakeEnvironmentSpawner ¶
type FakeEnvironmentSpawner struct { CreateFunc func(ctx context.Context, rd models.RepoRevisionData) (string, error) UpdateFunc func(ctx context.Context, rd models.RepoRevisionData) (string, error) DestroyFunc func(ctx context.Context, rd models.RepoRevisionData, reason models.QADestroyReason) error DestroyExplicitlyFunc func(ctx context.Context, env *models.QAEnvironment, reason models.QADestroyReason) error SuccessFunc func(ctx context.Context, name string) error FailureFunc func(ctx context.Context, name, msg string) error }
func (*FakeEnvironmentSpawner) Create ¶
func (fes *FakeEnvironmentSpawner) Create(ctx context.Context, rd models.RepoRevisionData) (string, error)
func (*FakeEnvironmentSpawner) Destroy ¶
func (fes *FakeEnvironmentSpawner) Destroy(ctx context.Context, rd models.RepoRevisionData, reason models.QADestroyReason) error
func (*FakeEnvironmentSpawner) DestroyExplicitly ¶
func (fes *FakeEnvironmentSpawner) DestroyExplicitly(ctx context.Context, env *models.QAEnvironment, reason models.QADestroyReason) error
func (*FakeEnvironmentSpawner) Failure ¶
func (fes *FakeEnvironmentSpawner) Failure(ctx context.Context, name, msg string) error
func (*FakeEnvironmentSpawner) Success ¶
func (fes *FakeEnvironmentSpawner) Success(ctx context.Context, name string) error
func (*FakeEnvironmentSpawner) Update ¶
func (fes *FakeEnvironmentSpawner) Update(ctx context.Context, rd models.RepoRevisionData) (string, error)
type GitHubEventWebhook ¶
type GitHubEventWebhook = ghevent.GitHubEventWebhook
type GithubConfig ¶
type GithubConfig = config.GithubConfig
type LockProvider ¶
type LockProvider = locker.LockProvider
type MetricsCollector ¶
type MigrateConfig ¶
type MigrateConfig = config.MigrateConfig
type NameGenerator ¶
type NameGenerator = namegen.NameGenerator
type PreemptiveLockProvider ¶
type PreemptiveLockProvider = locker.PreemptiveLockProvider
type PreemptiveLocker ¶
type PreemptiveLocker = locker.PreemptiveLocker
type ProvisioningMetricsCollector ¶
type ProvisioningMetricsCollector interface { ProvisioningMetricsTimer ProvisioningDuration(string, string, string, time.Duration, error) ContainerBuildAllDuration(string, string, string, time.Duration, error) ContainerBuildDuration(string, string, string, string, string, time.Duration, error) Success(string, string, string) Failure(string, string, string) AminoDeployTimedOut(name, repo, ref string) ImageBuildFailed(name, repo, ref string) }
type QADestroyReason ¶
type QADestroyReason = models.QADestroyReason
type QAEnvironment ¶
type QAEnvironment = models.QAEnvironment
type QAEnvironmentEvent ¶
type QAEnvironmentEvent = models.QAEnvironmentEvent
type QAEnvironments ¶
type QAEnvironments = models.QAEnvironments
type QASpawner ¶
type QASpawner struct {
// contains filtered or unexported fields
}
QASpawner is an object that can manage environments in AWS
func NewQASpawner ¶
func NewQASpawner(logger *log.Logger, dl DataLayer, ng NameGenerator, rc RepoClient, lp PreemptiveLockProvider, furanAddrs []string, consulAddr string, cn ChatNotifier, omc MetricsCollector, pmc MetricsCollector, nrapp newrelic.Application, awsCreds *AWSCreds, awsConfig *AWSConfig, backendConfig *BackendConfig, ac *AminoConfig, typepath string, globalLimit uint, hostnameTemplate string, datadogServiceNamePrefix string) (*QASpawner, error)
NewQASpawner returns a new QASpawner instance with the specified logger and datalayer
func (*QASpawner) Destroy ¶
func (qs *QASpawner) Destroy(ctx context.Context, rd RepoRevisionData, reason QADestroyReason) error
Destroy destroys a specific named QA environment
func (*QASpawner) DestroyExplicitly ¶
func (qs *QASpawner) DestroyExplicitly(ctx context.Context, qa *QAEnvironment, reason QADestroyReason) error
DestroyExplicitly destroys a QA by name explicitly
type RepoClient ¶
type RepoClient = ghclient.RepoClient
type RepoRevisionData ¶
type RepoRevisionData = models.RepoRevisionData
type SecretsConfig ¶
type SecretsConfig = config.SecretsConfig
type ServerConfig ¶
type ServerConfig = config.ServerConfig
type SlackConfig ¶
type SlackConfig = config.SlackConfig
type VaultConfig ¶
type VaultConfig = config.VaultConfig
Directories ¶
Path | Synopsis |
---|---|
Package pbaminoapi is a generated protocol buffer package.
|
Package pbaminoapi is a generated protocol buffer package. |