Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Exiting = false
Exiting is a flag indicating that the server is exiting
var WaitGroup sync.WaitGroup
WaitGroup is the wait group to synchronize deployments and job runs
Functions ¶
Types ¶
type AppResponse ¶
type AppResponse struct { Repository []*docker.Image `json:"repository,omitempty"` DeploymentSpec string `json:"deploymentSpec,omitempty"` ReplicaSet *v1beta1.ReplicaSet `json:"replicaSet,omitempty"` Service *v1.Service `json:"service,omitempty"` }
AppResponse is the response for the app endpoint
type AppsResponse ¶
type AppsResponse struct { ReplicaSets map[string]v1beta1.ReplicaSet `json:"replicaSets,omitempty"` Services *v1.ServiceList `json:"services,omitempty"` }
AppsResponse is the response for the app endpoint
type Clock ¶
Clock is a time.Duration struct with custom JSON marshal functions
func (*Clock) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface
func (*Clock) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface
type Deployment ¶
type Deployment struct { ID string `json:"id"` Env string `json:"env"` App string `json:"app"` Branch string `json:"branch"` Tag string `json:"tag"` Time time.Time `json:"time"` Username string `json:"username"` State string `json:"state"` Rollout *Rollout `json:"rollout,omitempty"` Clock *Clock `json:"clock"` DesiredReplicas int `json:"desiredReplicas"` OriginalPods []Pod `json:"originalPods"` FromPods []Pod `json:"fromPods"` FromTag string `json:"fromTag"` FromUID string `json:"fromUid"` ToPods []Pod `json:"toPods"` ToUID string `json:"toUid"` }
Deployment represents a single deployment of an image for any app
type DeploymentInitError ¶
type DeploymentInitError struct {
// contains filtered or unexported fields
}
DeploymentInitError is raised if there is a problem initializing a deployment
func (DeploymentInitError) Error ¶
func (e DeploymentInitError) Error() string
type DeploymentScaleRequest ¶ added in v1.1.0
type DeploymentScaleRequest struct {
Replicas *int `json:"replicas"`
}
DeploymentScaleRequest is a request to scale a deployment
type EnvironmentCreateRequest ¶ added in v1.1.0
type EnvironmentCreateRequest struct { Name string `json:"name"` Branch string `json:"branch"` Spec string `json:"spec"` }
EnvironmentCreateRequest is a request to create a new environment
type JobResponse ¶
type JobResponse struct { Repository []*docker.Image `json:"repository,omitempty"` PodSpec string `json:"podSpec,omitempty"` }
JobResponse is the response for the job endpoint
type LogMessage ¶
type LogMessage struct { Time time.Time `json:"time"` Message string `json:"msg"` Level string `json:"level"` }
LogMessage is a wrapper for log messages in the db
type Pod ¶
type Pod struct { Name string `json:"name"` Created time.Time `json:"created"` Phase string `json:"phase"` Ready bool `json:"ready"` Host string `json:"host"` }
Pod is a summary of the state of a kubernetes pod
type Release ¶
type Release struct { URL string `json:"url,omitempty"` Time time.Time `json:"time"` Username string `json:"username"` Approved bool `json:"approved"` }
Release is an object representing an image tag for release
type Rollout ¶
type Rollout struct {
Strategy string `json:"strategy"`
}
Rollout is the description of how the deployment will be rolled out TODO: support MaxUnavailable and MaxSurge for rolling updates
type Run ¶
type Run struct { ID string `json:"id"` Branch string `json:"branch"` Tag string `json:"tag"` Time time.Time `json:"time"` Username string `json:"username"` State string `json:"state"` Clock *Clock `json:"clock"` UID string `json:"uid"` }
Run represents a single run of an image for any job
type RunInitError ¶
type RunInitError struct {
// contains filtered or unexported fields
}
RunInitError is raised if there is a problem initializing a run
func (RunInitError) Error ¶
func (e RunInitError) Error() string