Documentation ¶
Index ¶
- type CandidateRepository
- func (r *CandidateRepository) AssignMarathonSpecToCandidate(name, version, specContent string) error
- func (r *CandidateRepository) CompleteStage(name, version, stage string) error
- func (r *CandidateRepository) Dispose() error
- func (r *CandidateRepository) FindCandidate(name, version string) (DeploymentCandidate, error)
- func (r *CandidateRepository) GetCandidatesForE2E() ([]DeploymentCandidate, error)
- func (r *CandidateRepository) MarkCandidateAsSucceeded(name, version string) error
- func (r *CandidateRepository) RegisterNewCandidate(name, image, version string) error
- type DeploymentCandidate
- type IRepository
- type TrackedService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CandidateRepository ¶
type CandidateRepository struct { Session *mgo.Session Catalog string }
CandidateRepository is the repository of deployment candidates
func (*CandidateRepository) AssignMarathonSpecToCandidate ¶
func (r *CandidateRepository) AssignMarathonSpecToCandidate(name, version, specContent string) error
AssignMarathonSpecToCandidate attaches a MarathonSpec to a given candidate
func (*CandidateRepository) CompleteStage ¶
func (r *CandidateRepository) CompleteStage(name, version, stage string) error
CompleteStage mark a give stage on the pipeline as completed
func (*CandidateRepository) Dispose ¶
func (r *CandidateRepository) Dispose() error
Dispose closes the open session
func (*CandidateRepository) FindCandidate ¶
func (r *CandidateRepository) FindCandidate(name, version string) (DeploymentCandidate, error)
FindCandidate Retrieves a candidate based on the given criterias
func (*CandidateRepository) GetCandidatesForE2E ¶
func (r *CandidateRepository) GetCandidatesForE2E() ([]DeploymentCandidate, error)
GetCandidatesForE2E gets candidates that have passed unit testing and have a marathon spec
func (*CandidateRepository) MarkCandidateAsSucceeded ¶
func (r *CandidateRepository) MarkCandidateAsSucceeded(name, version string) error
MarkCandidateAsSucceeded mark a candidate deployment as having succeeded
func (*CandidateRepository) RegisterNewCandidate ¶
func (r *CandidateRepository) RegisterNewCandidate(name, image, version string) error
RegisterNewCandidate starts a new deployment candidate
type DeploymentCandidate ¶
type DeploymentCandidate struct { Image string `json:"Image" bson:"Image"` Version string `json:"Version" bson:"Version"` Started int64 `json:"Started" bson:"Started"` Completed bool `json:"Completed" bson:"Completed"` Succeeded bool `json:"Succeeded" bson:"Succeeded"` MarathonVersion string `json:"MarathonVersion" bson:"MarathonVersion"` Unit bool `json:"Unit" bson:"Unit"` E2E bool `json:"E2E" bson:"E2E"` Deployed bool `json:"Deployed" bson:"Deployed"` MarathonSpec string `json:"MarathonSpec" bson:"MarathonSpec"` ServiceName string `json:"ServiceName" bson:"ServiceName"` }
DeploymentCandidate represents candidate deployments that go through the deployment pipeline
type IRepository ¶
type IRepository interface { FindCandidate(name, version string) (DeploymentCandidate, error) CompleteStage(name, version, stage string) error RegisterNewCandidate(name, image, version string) error AssignMarathonSpecToCandidate(name, version, specContent string) error MarkCandidateAsSucceeded(name, version string) error GetCandidatesForE2E() ([]DeploymentCandidate, error) Dispose() error }
IRepository defines the set of operations applicable to the tables/collection used through the pipeline
func NewRepository ¶
func NewRepository(url, catalog string) (IRepository, error)
NewRepository creates a new repository
type TrackedService ¶
type TrackedService struct { Name string `json:"Name" bson:"Name"` Description string `json:"Description" bson:"Description"` }
TrackedService represents a micro service that is allowed and tracked in the deployment pipeline