Documentation ¶
Index ¶
- Constants
- Variables
- func In(val interface{}, array interface{}) bool
- type App
- type Application
- type Applications
- type Cluster
- type Clusters
- type ConfigMap
- type Configs
- type Container
- type DSN
- type Deployment
- type DeploymentRequest
- type Job
- type Jobs
- type Message
- type Metric
- type Migration
- type Namespace
- type Namespaces
- type PatchStringValue
- type PatchUInt32Value
Constants ¶
const ( // COUNTER is a Prometheus COUNTER metric COUNTER string = "counter" // GAUGE is a Prometheus GAUGE metric GAUGE string = "gauge" // HISTOGRAM is a Prometheus HISTOGRAM metric HISTOGRAM string = "histogram" // SUMMARY is a Prometheus SUMMARY metric SUMMARY string = "summary" )
Variables ¶
var ( // JobPending pending job type JobPending = "pending" // JobFailed failed job type JobFailed = "failed" // JobSuccess success job type JobSuccess = "success" // JobOnHold on hold job type JobOnHold = "on_hold" // JobDeploymentUpdate deployment update JobDeploymentUpdate = "deployment.update" // JobDeploymentNotify deployment notify JobDeploymentNotify = "deployment.notify" )
var ( // RecreateStrategy var RecreateStrategy = "recreate" // RampedStrategy var RampedStrategy = "ramped" // CanaryStrategy var CanaryStrategy = "canary" // BlueGreenStrategy var BlueGreenStrategy = "blue_green" )
Functions ¶
Types ¶
type Application ¶
type Application struct { ID string `json:"id"` Name string `json:"name"` Format string `json:"format"` Containers []Container `json:"containers"` }
Application struct
func (*Application) ConvertToJSON ¶
func (c *Application) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*Application) LoadFromJSON ¶
func (c *Application) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
type Applications ¶
type Applications struct {
Applications []Application `json:"applications"`
}
Applications struct
func (*Applications) ConvertToJSON ¶
func (c *Applications) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*Applications) LoadFromJSON ¶
func (c *Applications) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
type Clusters ¶
type Clusters struct {
Clusters []Cluster `json:"clusters"`
}
Clusters struct
func (*Clusters) ConvertToJSON ¶
ConvertToJSON convert object to json
type ConfigMap ¶
type ConfigMap struct { Name string `json:"name"` Namespace string `json:"namespace"` UID string `json:"uid"` CreationTimestamp string `json:"creation_timestamp"` Data map[string]string `json:"data"` Labels map[string]string `json:"labels"` }
ConfigMap struct
func (*ConfigMap) ConvertToJSON ¶
ConvertToJSON convert object to json
type Container ¶
type Container struct { Name string `json:"name"` Image string `json:"image"` Version string `json:"version"` Deployment Deployment `json:"deployment"` }
Container struct
type DSN ¶
type DSN struct { Driver string `json:"driver"` Username string `json:"username"` Password string `json:"password"` Hostname string `json:"hostname"` Port int `json:"port"` Name string `json:"name"` }
DSN struct
func (*DSN) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*DSN) LoadFromJSON ¶
LoadFromJSON update object from json
type Deployment ¶
Deployment struct
func (*Deployment) ConvertToJSON ¶
func (d *Deployment) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*Deployment) LoadFromJSON ¶
func (d *Deployment) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
type DeploymentRequest ¶
type DeploymentRequest struct { Cluster string `json:"cluster"` Namespace string `json:"namespace"` Application string `json:"application"` Version string `json:"version"` Strategy string `json:"strategy"` Status string `json:"status"` // Ramped Strategy MaxSurge string `json:"maxSurge"` }
DeploymentRequest struct
func (*DeploymentRequest) ConvertToJSON ¶
func (d *DeploymentRequest) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*DeploymentRequest) LoadFromJSON ¶
func (d *DeploymentRequest) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
func (*DeploymentRequest) Validate ¶
func (d *DeploymentRequest) Validate(strategies []string) error
Validate validates the request
type Job ¶
type Job struct { ID int `json:"id"` UUID string `json:"uuid"` Payload string `json:"payload"` Status string `json:"status"` Type string `json:"type"` Result string `json:"result"` Retry int `json:"retry"` Parent int `json:"parent"` RunAt *time.Time `json:"run_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Job struct
func (*Job) ConvertToJSON ¶
ConvertToJSON convert object to json
type Jobs ¶
type Jobs struct {
Jobs []Job `json:"jobs"`
}
Jobs struct
func (*Jobs) ConvertToJSON ¶
ConvertToJSON convert object to json
type Metric ¶
type Metric struct { Type string `json:"type"` Name string `json:"name"` Help string `json:"help"` Method string `json:"method"` Value string `json:"value"` Labels prometheus.Labels `json:"labels"` Buckets []float64 `json:"buckets"` }
Metric struct
func (*Metric) ConvertToJSON ¶
ConvertToJSON convert object to json
func (*Metric) GetValueAsFloat ¶
GetValueAsFloat gets a list of label values
func (*Metric) LabelValues ¶
LabelValues gets a list of label values
type Migration ¶
type Migration struct { ID int `json:"id"` Flag string `json:"file"` RunAt time.Time `json:"run_at"` }
Migration struct
func (*Migration) ConvertToJSON ¶
ConvertToJSON convert object to json
type Namespace ¶
type Namespace struct { Name string `json:"name"` UID string `json:"uid"` Status string `json:"status"` }
Namespace struct
func (*Namespace) ConvertToJSON ¶
ConvertToJSON convert object to json
type Namespaces ¶
type Namespaces struct {
Namespaces []Namespace `json:"namespaces"`
}
Namespaces struct
func (*Namespaces) ConvertToJSON ¶
func (d *Namespaces) ConvertToJSON() (string, error)
ConvertToJSON convert object to json
func (*Namespaces) LoadFromJSON ¶
func (d *Namespaces) LoadFromJSON(data []byte) (bool, error)
LoadFromJSON update object from json
type PatchStringValue ¶
type PatchStringValue struct { Op string `json:"op"` Path string `json:"path"` Value string `json:"value"` }
PatchStringValue specifies a patch operation for a string.
type PatchUInt32Value ¶
type PatchUInt32Value struct { Op string `json:"op"` Path string `json:"path"` Value uint32 `json:"value"` }
PatchUInt32Value specifies a patch operation for a uint32.