Documentation
¶
Index ¶
- Variables
- func AddHandlers(s *server.Server, envs []string)
- type AppResponse
- type AppsResponse
- type Clock
- type ControllerScaleRequest
- type Deployment
- type DeploymentInitError
- type JobResponse
- type LogMessage
- type Pod
- type Release
- type Rollout
- type RolloutStrategy
- type RolloutStrategyStep
- type Run
- type RunInitError
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 ¶
func AddHandlers ¶
AddHandlers adds api handlers to the server
Types ¶
type AppResponse ¶
type AppResponse struct {
Repository []*docker.Image `json:"repository,omitempty"`
ControllerTemplate string `json:"controllerTemplate,omitempty"`
Variables map[string]string `json:"variables,omitempty"`
Controller *v1.ReplicationController `json:"controller,omitempty"`
Service *v1.Service `json:"service,omitempty"`
}
AppResponse is the response for the app endpoint
type AppsResponse ¶
type AppsResponse struct {
Controllers *v1.ReplicationControllerList `json:"controllers,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 ControllerScaleRequest ¶
type ControllerScaleRequest struct {
Replicas *int `json:"replicas"`
}
ControllerScaleRequest is a request to
type Deployment ¶
type Deployment struct {
ID string `json:"id"`
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 JobResponse ¶
type JobResponse struct {
Repository []*docker.Image `json:"repository,omitempty"`
PodTemplate string `json:"podTemplate,omitempty"`
Variables map[string]string `json:"variables,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 {
Autopause bool `json:"autopause"`
Strategy *RolloutStrategy `json:"strategy"`
}
Rollout is the description of how the deployment will be rolled out Autopause determines whether the deployment will pause automatically at each step
type RolloutStrategy ¶
type RolloutStrategy struct {
Name string `json:"name"`
Steps []RolloutStrategyStep `json:"steps"`
}
RolloutStrategy is the strategy used to roll out pods
type RolloutStrategyStep ¶
type RolloutStrategyStep struct {
Count *int `json:"count,omitempty"`
Ratio *float64 `json:"ratio,omitempty"`
}
RolloutStrategyStep is the specification of a step of a rollout strategy
type Run ¶
type Run struct {
ID string `json:"id"`
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