types

package
v0.1.0-beta1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerTypeLBC = "LBC"
	ContainerTypeLBR = "LBR"
)
View Source
const (
	// EndpointSpecRouteStrategyRR - round robin balancing strategy type
	EndpointSpecRouteStrategyRR = "rr"
	// EndpointSpecBindStrategyDefault - default scheduling endpoint across all nodes
	EndpointSpecBindStrategyDefault = "default"
)
View Source
const (
	EventActionCreate = "create"
	EventActionUpdate = "update"
	EventActionDelete = "delete"
	EventActionError  = "error"
)
View Source
const (
	KindSecretOpaque = "opaque"
	KindSecretAuth   = "auth"

	SecretUsernameKey = "username"
	SecretPasswordKey = "password"
)
View Source
const (
	DEFAULT_SERVICE_MEMORY   int64 = 128
	DEFAULT_SERVICE_REPLICAS int   = 1
)
View Source
const (
	DEFAULT_MEMORY_MIN        = 128
	DEFAULT_REPLICAS_MIN      = 1
	DEFAULT_DESCRIPTION_LIMIT = 512

	KindSecret    = "secret"
	KindRoute     = "route"
	KindNamespace = "namespace"
	KindService   = "service"
	KindPod       = "pod"
	KindEndpoint  = "endpoint"
	KindConfig    = "config"
	KindVolume    = "volume"
)
View Source
const ContainerRolePrimary = "primary"
View Source
const ContainerRoleSlave = "slave"
View Source
const (
	DEFAULT_NAMESPACE string = "default"
)
View Source
const EmptyString = ""
View Source
const EmptyStringSlice = "[]"
View Source
const KindAPIServer = "api"
View Source
const (
	KindConfigText = "text"
)
View Source
const KindController = "controller"
View Source
const KindDiscovery = "discovery"
View Source
const KindNode = "node"
View Source
const (
	KindVolumeHostDir = "dir"
)
View Source
const NetworkTypeVxLAN = "vxlan"
View Source
const StateCancel = "cancel"
View Source
const StateCreated = "created"
View Source
const StateDegradation = "degradation"
View Source
const StateDestroy = "destroy"
View Source
const StateDestroyed = "destroyed"
View Source
const StateError = "error"
View Source
const StateExited = "exited"
View Source
const StateNotReady = "not ready"
View Source
const StateProvision = "provision"
View Source
const StateReady = "ready"
View Source
const StateStarted = "started"
View Source
const StateUpdated = "updated"
View Source
const StateWaiting = "waiting"
View Source
const StateWarning = "warning"
View Source
const StatusBuild = "build"
View Source
const StatusInitialized = "initialized"
View Source
const StatusPull = "pull"
View Source
const StatusRunning = "running"
View Source
const StatusStarting = "starting"
View Source
const StatusStopped = "stopped"
View Source
const StepInitialized = "initialized"
View Source
const StepPull = "pull"
View Source
const StepReady = "ready"

Variables

View Source
var (
	SecretAccessToken = ""
)

Functions

func SubnetGetNameFromCIDR

func SubnetGetNameFromCIDR(CIDR string) string

func SubnetSpecEqual

func SubnetSpecEqual(n *SubnetSpec, nt *SubnetSpec) bool

Types

type AuthConfig

type AuthConfig struct {
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
	Auth     string `json:"auth,omitempty"`
	// Email is an optional value associated with the username.
	// This field is deprecated and will be removed in a later
	// version of docker.
	Email         string `json:"email,omitempty"`
	ServerAddress string `json:"serveraddress,omitempty"`
	// IdentityToken is used to authenticate the user and get
	// an access token for the registry.
	IdentityToken string `json:"identitytoken,omitempty"`
	// RegistryToken is a bearer token to be sent to a registry
	RegistryToken string `json:"registrytoken,omitempty"`
}

swagger:ignore AuthConfig contains authorization information for connecting to a Registry swagger:model types_authConfig

type Cluster

type Cluster struct {
	Runtime
	Meta   Meta          `json:"meta"`
	Status ClusterStatus `json:"status"`
	Spec   ClusterSpec   `json:"spec"`
}

type ClusterCreateOptions

type ClusterCreateOptions struct {
	Description string `json:"description"`
}

swagger:ignore

type ClusterEvent

type ClusterEvent struct {
	Data *Cluster
	// contains filtered or unexported fields
}

func (*ClusterEvent) IsActionCreate

func (e *ClusterEvent) IsActionCreate() bool

func (*ClusterEvent) IsActionError

func (e *ClusterEvent) IsActionError() bool

func (*ClusterEvent) IsActionRemove

func (e *ClusterEvent) IsActionRemove() bool

func (*ClusterEvent) IsActionUpdate

func (e *ClusterEvent) IsActionUpdate() bool

type ClusterList

type ClusterList struct {
	Runtime
	Items []*Cluster
}

type ClusterMap

type ClusterMap struct {
	Runtime
	Items map[string]*Cluster
}

type ClusterResources

type ClusterResources struct {
	Containers int   `json:"containers"`
	Pods       int   `json:"pods"`
	Memory     int64 `json:"memory"`
	Cpu        int   `json:"cpu"`
	Storage    int64 `json:"storage"`
}

type ClusterSpec

type ClusterSpec struct {
}

type ClusterStatus

type ClusterStatus struct {
	Nodes     ClusterStatusNodes `json:"nodes"`
	Capacity  ClusterResources   `json:"capacity"`
	Allocated ClusterResources   `json:"allocated"`
	Deleted   bool               `json:"deleted"`
}

type ClusterStatusNodes

type ClusterStatusNodes struct {
	Total   int `json:"total"`
	Online  int `json:"online"`
	Offline int `json:"offline"`
}

type Config

type Config struct {
	Runtime
	Meta ConfigMeta `json:"meta" yaml:"meta"`
	Spec ConfigSpec `json:"spec" yaml:"spec"`
}

swagger:ignore swagger:model types_config

func (s *Config) CreateSelfLink(namespace, name string) string

func (*Config) GetHash

func (s *Config) GetHash() string
func (s *Config) SelfLink() string

type ConfigEvent

type ConfigEvent struct {
	Data *Config
	// contains filtered or unexported fields
}

func (*ConfigEvent) IsActionCreate

func (e *ConfigEvent) IsActionCreate() bool

func (*ConfigEvent) IsActionError

func (e *ConfigEvent) IsActionError() bool

func (*ConfigEvent) IsActionRemove

func (e *ConfigEvent) IsActionRemove() bool

func (*ConfigEvent) IsActionUpdate

func (e *ConfigEvent) IsActionUpdate() bool

type ConfigFile

type ConfigFile struct {
	Files map[string][]byte `json:"text"`
}

type ConfigList

type ConfigList struct {
	Runtime
	Items []*Config
}

swagger:ignore

func NewConfigList

func NewConfigList() *ConfigList

type ConfigManifest

type ConfigManifest struct {
	Runtime
	State   string            `json:"state"`
	Type    string            `json:"kind"`
	Data    map[string]string `json:"data" yaml:"data"`
	Created time.Time         `json:"created"`
	Updated time.Time         `json:"updated"`
}

func (*ConfigManifest) Set

func (c *ConfigManifest) Set(cfg *Config)

type ConfigMap

type ConfigMap struct {
	Runtime
	Items map[string]*Config
}

swagger:ignore

func NewConfigMap

func NewConfigMap() *ConfigMap

type ConfigMeta

type ConfigMeta struct {
	Kind      string `json:"kind"`
	Namespace string `json:"namespace"`
	Meta      `yaml:",inline"`
}

swagger:ignore swagger:model types_config_meta

type ConfigRemoveOptions

type ConfigRemoveOptions struct {
	Force bool `json:"force"`
}

swagger:ignore

type ConfigSpec

type ConfigSpec struct {
	Type string            `json:"type" yaml:"type"`
	Data map[string]string `json:"data" yaml:"data"`
}

type ConfigText

type ConfigText struct {
	Text string `json:"text"`
}

type Container

type Container struct {
	// Container CID
	ID string `json:"id"`
	// Container Pod ID
	Pod string `json:"pod"`
	// Container Deployment ID
	Deployment string `json:"deployment"`
	// Container Namespace ID
	Namespace string `json:"namespace"`
	// Container envs
	Envs []string `json:"envs"`
	// Container binds
	Binds []string `json:"binds"`
	// Container name
	Name string `json:"name"`
	// Name information
	Image string `json:"image"`
	// Container current state
	State string `json:"state"`
	// ExitCode of the container
	ExitCode int `json:"exit_code"`
	// Container current state
	Status string `json:"status,omitempty"`
	// Container network settings
	Network NetworkSettings `json:"network"`
	// Container labels
	Labels map[string]string `json:"labels"`
	// Contaienr restart policy
	Restart struct {
		Policy string `json:"policy"`
		Retry  int    `json:"count"`
	} `json:"restart"`
	// Container created time
	Created time.Time `json:"created"`
	// Container started time
	Started time.Time `json:"started"`

	Exec SpecTemplateContainerExec `json:"exec"`
}

type ContainerDNSSpec

type ContainerDNSSpec struct {
	// List of DNS servers
	Server []string `json:"server"`
	// DNS server search options
	Search []string `json:"search"`
	// DNS server other options
	Options []string `json:"options"`
}

type ContainerLinkSpec

type ContainerLinkSpec struct {
	// Link name
	Link string `json:"link"`
	// Container alias
	Alias string `json:"alias"`
}

type ContainerManifest

type ContainerManifest struct {
	// Template container id
	ID string `json:"id" yaml:"id"`
	// Template container name
	Name string `json:"name" yaml:"name"`
	// Labels list
	Labels map[string]string `json:"labels" yaml:"labels"`
	// Template container image
	Image string `json:"image" yaml:"image"`
	// Template container ports binding
	Ports SpecTemplateContainerPorts `json:"ports" yaml:"ports"`
	// Template container envs
	Envs []string `json:"env" yaml:"env"`
	// Template container resources
	Resources SpecTemplateContainerResources `json:"resources" yaml:"resources"`
	// Template container exec options
	Exec SpecTemplateContainerExec `json:"exec" yaml:"exec"`
	// Template container binds
	Binds []string `json:"volumes" yaml:"volumes"`
	// Template container security
	Security SpecTemplateContainerSecurity `json:"security" yaml:"security"`
	// Subnet container settings
	Network SpecTemplateContainerNetwork `json:"network" yaml:"network"`
	// Container DNS configuration
	DNS SpecTemplateContainerDNS `json:"dns" yaml:"dns"`
	// List of extra hosts
	ExtraHosts []string `json:"extra_hosts" yaml:"extra_hosts"`
	// Should docker publish all exposed port for the container
	PublishAllPorts bool `json:"publish" yaml:"publish"`
	// Links to another containers
	Links []SpecTemplateContainerLink `json:"links" yaml:"links"`
	// Restart Policy
	RestartPolicy SpecTemplateRestartPolicy `json:"restart" yaml:"restart"`
	// AutoRemove flag
	AutoRemove bool `json:"autoremove" yaml:"autoremove"`
}

func NewContainerManifest

func NewContainerManifest(spec *SpecTemplateContainer) *ContainerManifest

type ContainerNetworkSpec

type ContainerNetworkSpec struct {
	// Container hostname
	Hostname string `json:"hostname"`
	// Container host domain
	Domain string `json:"domain"`
	// Subnet ID to use
	Network string `json:"network"`
	// Subnet Mode to use
	Mode string `json:"mode"`
}

type ContainerPortSpec

type ContainerPortSpec struct {
	// Container port to expose
	ContainerPort int `json:"container_port"`
	// Containers protocol allowed on exposed port
	Protocol string `json:"protocol"`
}

type ContainerQuotaSpec

type ContainerQuotaSpec struct {
	// Maximum memory allowed to use
	Memory int64 `json:"memory"`
	// CPU shares for container on one node
	CPUShares int64 `json:"cpu_shares"`
}

type ContainerRestartPolicySpec

type ContainerRestartPolicySpec struct {
	// Restart policy name
	Name string `json:"name"`
	// Attempt to restart container
	Attempt int `json:"attempt"`
}

type ContainerSpec

type ContainerSpec struct {
	ID string `json:"id"`
	// Container meta spec
	Meta ContainerSpecMeta `json:"meta"`
	// Name spec
	Image ImageSpec `json:"image"`
	// Subnet spec
	Network ContainerNetworkSpec `json:"network"`
	// Ports configuration
	Ports []ContainerPortSpec `json:"ports"`
	// Labels list
	Labels map[string]string `json:"labels"`
	// Environments list
	EnvVars []string `json:"environments"`
	// Container enrtypoint
	Entrypoint []string `json:"entrypoint"`
	// Container run command
	Command []string `json:"command"`
	// Container run command arguments
	Args []string `json:"args"`
	// Container DNS configuration
	DNS ContainerDNSSpec `json:"dns"`
	// Container resources quota
	Quota ContainerQuotaSpec `json:"quota"`
	// Container restart policy
	RestartPolicy ContainerRestartPolicySpec `json:"restart_policy"`
	// Container volumes mount
	Volumes []ContainerVolumeSpec `json:"volumes"`
	// Links to another containers
	Links []ContainerLinkSpec `json:"links"`
	// Container in privileged mode
	Privileged bool `json:"privileged"`
	// PWD where the commands will be run
	Workdir string `json:"workdir"`
	// List of extra hosts
	ExtraHosts []string `json:"extra_hosts"`
	// Should docker publish all exposed port for the container
	PublishAllPorts bool `json:"publish_all_ports"`
}

func (*ContainerSpec) CommandFromString

func (cs *ContainerSpec) CommandFromString(command string)

func (*ContainerSpec) CommandToString

func (cs *ContainerSpec) CommandToString() string

func (*ContainerSpec) DNSOptionsFromString

func (cs *ContainerSpec) DNSOptionsFromString(options string)

func (*ContainerSpec) DNSOptionsToString

func (cs *ContainerSpec) DNSOptionsToString() string

func (*ContainerSpec) DNSSearchFromString

func (cs *ContainerSpec) DNSSearchFromString(search string)

func (*ContainerSpec) DNSSearchToString

func (cs *ContainerSpec) DNSSearchToString() string

func (*ContainerSpec) DNSServerFromString

func (cs *ContainerSpec) DNSServerFromString(server string)

func (*ContainerSpec) DNSServerToString

func (cs *ContainerSpec) DNSServerToString() string

func (*ContainerSpec) ENVsFromString

func (cs *ContainerSpec) ENVsFromString(envs string)

func (*ContainerSpec) ENVsToString

func (cs *ContainerSpec) ENVsToString() string

func (*ContainerSpec) EntrypointFromString

func (cs *ContainerSpec) EntrypointFromString(entrypoint string)

func (*ContainerSpec) EntrypointToString

func (cs *ContainerSpec) EntrypointToString() string

func (*ContainerSpec) PortsFromString

func (cs *ContainerSpec) PortsFromString(ports string)

func (*ContainerSpec) PortsToString

func (cs *ContainerSpec) PortsToString() string

func (*ContainerSpec) VolumesFromString

func (cs *ContainerSpec) VolumesFromString(volumes string)

func (*ContainerSpec) VolumesToString

func (cs *ContainerSpec) VolumesToString() string

type ContainerSpecMeta

type ContainerSpecMeta struct {
	Meta
	// Service id
	Service string `json:"service"`
	// Service spec id
	Spec string `json:"spec"`
}

type ContainerStatusInfo

type ContainerStatusInfo struct {
	// Container ID on host
	ID string `json:"cid"`
	// Name ID
	Image string `json:"image"`
	// Container current state
	State string `json:"state"`
	// Container current state
	Status string `json:"status"`
	// Container ports mapping
	Ports map[string][]ContainerStatusInfoPort `json:"ports"`
	// Container created time
	Created time.Time `json:"created"`
	// Container updated time
	Updated time.Time `json:"updated"`
}

type ContainerStatusInfoPort

type ContainerStatusInfoPort struct {
	HostIP   string `json:"host_ip"`
	HostPort string `json:"host_port"`
}

type ContainerVolumeSpec

type ContainerVolumeSpec struct {
	// Volume name
	Volume string `json:"volume"`
	// Container mount path
	MountPath string `json:"mount_path"`
}

type Deployment

type Deployment struct {
	Runtime
	// Deployment Meta
	Meta DeploymentMeta `json:"meta"`
	// Deployment status
	Status DeploymentStatus `json:"status"`
	// Deployment spec
	Spec DeploymentSpec `json:"spec"`
}
func (d *Deployment) CreateSelfLink(namespace, service, name string) string
func (d *Deployment) SelfLink() string
func (d *Deployment) ServiceLink() string

type DeploymentEvent

type DeploymentEvent struct {
	Data *Deployment
	// contains filtered or unexported fields
}

func (*DeploymentEvent) IsActionCreate

func (e *DeploymentEvent) IsActionCreate() bool

func (*DeploymentEvent) IsActionError

func (e *DeploymentEvent) IsActionError() bool

func (*DeploymentEvent) IsActionRemove

func (e *DeploymentEvent) IsActionRemove() bool

func (*DeploymentEvent) IsActionUpdate

func (e *DeploymentEvent) IsActionUpdate() bool

type DeploymentList

type DeploymentList struct {
	Runtime
	Items []*Deployment
}

func NewDeploymentList

func NewDeploymentList() *DeploymentList

type DeploymentMap

type DeploymentMap struct {
	Runtime
	Items map[string]*Deployment
}

func NewDeploymentMap

func NewDeploymentMap() *DeploymentMap

type DeploymentMeta

type DeploymentMeta struct {
	Meta
	// Version
	Version int `json:"version"`
	// Namespace id
	Namespace string `json:"namespace"`
	// Service id
	Service string `json:"service"`
	// Endpoint
	Endpoint string `json:"endpoint"`
	// Self Link
	Status string `json:"status"`
}

type DeploymentOptions

type DeploymentOptions struct {
	Replicas int `json:"replicas"`
}

type DeploymentReplicas

type DeploymentReplicas struct {
	Total     int `json:"total"`
	Provision int `json:"provision"`
	Pulling   int `json:"pulling"`
	Created   int `json:"created"`
	Started   int `json:"started"`
	Stopped   int `json:"stopped"`
	Errored   int `json:"errored"`
}

type DeploymentSpec

type DeploymentSpec struct {
	Replicas int          `json:"replicas"`
	State    SpecState    `json:"state"`
	Selector SpecSelector `json:"selector"`
	Template SpecTemplate `json:"template"`
}

type DeploymentStatus

type DeploymentStatus struct {
	State   string `json:"state"`
	Message string `json:"message"`
}

func (*DeploymentStatus) SetCancel

func (d *DeploymentStatus) SetCancel()

func (*DeploymentStatus) SetDestroy

func (d *DeploymentStatus) SetDestroy()

func (*DeploymentStatus) SetProvision

func (d *DeploymentStatus) SetProvision()

func (*DeploymentStatus) SetReady

func (d *DeploymentStatus) SetReady()

type DeploymentUpdateOptions

type DeploymentUpdateOptions struct {
	// Number of replicas
	Replicas *int
	// Deployment status for update
	Status *struct {
		State   string
		Message string
	}
}

type Discovery

type Discovery struct {
	Runtime
	Meta   DiscoveryMeta   `json:"meta"`
	Status DiscoveryStatus `json:"status"`
	Spec   DiscoverySpec   `json:"spec"`
}

swagger:ignore

func (n *Discovery) SelfLink() string

type DiscoveryEvent

type DiscoveryEvent struct {
	Data *Discovery
	// contains filtered or unexported fields
}

func (*DiscoveryEvent) IsActionCreate

func (e *DiscoveryEvent) IsActionCreate() bool

func (*DiscoveryEvent) IsActionError

func (e *DiscoveryEvent) IsActionError() bool

func (*DiscoveryEvent) IsActionRemove

func (e *DiscoveryEvent) IsActionRemove() bool

func (*DiscoveryEvent) IsActionUpdate

func (e *DiscoveryEvent) IsActionUpdate() bool

type DiscoveryInfo

type DiscoveryInfo struct {
	Version      string `json:"version"`
	Hostname     string `json:"hostname"`
	Architecture string `json:"architecture"`

	OSName string `json:"os_name"`
	OSType string `json:"os_type"`

	// RewriteIP - need to set true if you want to use an external ip
	ExternalIP string `json:"external_ip"`
	InternalIP string `json:"internal_ip"`
}

swagger:model types_discovery_info

type DiscoveryList

type DiscoveryList struct {
	Runtime
	Items []*Discovery
}

func NewDiscoveryList

func NewDiscoveryList() *DiscoveryList

type DiscoveryManifest

type DiscoveryManifest struct {
	Meta    DiscoveryManifestMeta      `json:"meta"`
	Network map[string]*SubnetManifest `json:"network"`
}

type DiscoveryManifestMeta

type DiscoveryManifestMeta struct {
	Initial bool `json:"initial"`
}

type DiscoveryMap

type DiscoveryMap struct {
	Runtime
	Items map[string]*Discovery
}

func NewDiscoveryMap

func NewDiscoveryMap() *DiscoveryMap

type DiscoveryMeta

type DiscoveryMeta struct {
	Meta
	Node string `json:"node"`
}

swagger:ignore

type DiscoverySpec

type DiscoverySpec struct {
}

swagger:ignore

type DiscoveryStatus

type DiscoveryStatus struct {
	IP     string `json:"ip"`
	Port   uint16 `json:"port"`
	Ready  bool   `json:"ready"`
	Online bool   `json:"online"`
}

swagger:model types_discovery_status

type DiscoveryStatusEvent

type DiscoveryStatusEvent struct {
	Data *DiscoveryStatus
	// contains filtered or unexported fields
}

func (*DiscoveryStatusEvent) IsActionCreate

func (e *DiscoveryStatusEvent) IsActionCreate() bool

func (*DiscoveryStatusEvent) IsActionError

func (e *DiscoveryStatusEvent) IsActionError() bool

func (*DiscoveryStatusEvent) IsActionRemove

func (e *DiscoveryStatusEvent) IsActionRemove() bool

func (*DiscoveryStatusEvent) IsActionUpdate

func (e *DiscoveryStatusEvent) IsActionUpdate() bool

type Endpoint

type Endpoint struct {
	Runtime
	Meta   EndpointMeta   `json:"meta"`
	Status EndpointStatus `json:"status"`
	Spec   EndpointSpec   `json:"spec"`
}

swagger:ignore Endpoint - service endpoint

func (e *Endpoint) CreateSelfLink(namespace, name string) string
func (e *Endpoint) SelfLink() string

swagger:ignore SelfLink generates and returning link to object in platform

type EndpointCreateOptions

type EndpointCreateOptions struct {
	IP            string            `json:"ip"`
	Domain        string            `json:"domain"`
	Ports         map[uint16]string `json:"ports"`
	RouteStrategy string            `json:"route_strategy"`
	Policy        string            `json:"policy"`
	BindStrategy  string            `json:"bind_strategy"`
}

swagger:ignore

type EndpointEvent

type EndpointEvent struct {
	Data *Endpoint
	// contains filtered or unexported fields
}

func (*EndpointEvent) IsActionCreate

func (e *EndpointEvent) IsActionCreate() bool

func (*EndpointEvent) IsActionError

func (e *EndpointEvent) IsActionError() bool

func (*EndpointEvent) IsActionRemove

func (e *EndpointEvent) IsActionRemove() bool

func (*EndpointEvent) IsActionUpdate

func (e *EndpointEvent) IsActionUpdate() bool

type EndpointList

type EndpointList struct {
	Runtime
	Items []*Endpoint
}

func NewEndpointList

func NewEndpointList() *EndpointList

type EndpointManifest

type EndpointManifest struct {
	Runtime
	EndpointSpec `json:",inline"`
	Upstreams    []string `json:"upstreams"`
}

type EndpointManifestEvent

type EndpointManifestEvent struct {
	Data *EndpointManifest
	// contains filtered or unexported fields
}

func (*EndpointManifestEvent) IsActionCreate

func (e *EndpointManifestEvent) IsActionCreate() bool

func (*EndpointManifestEvent) IsActionError

func (e *EndpointManifestEvent) IsActionError() bool

func (*EndpointManifestEvent) IsActionRemove

func (e *EndpointManifestEvent) IsActionRemove() bool

func (*EndpointManifestEvent) IsActionUpdate

func (e *EndpointManifestEvent) IsActionUpdate() bool

type EndpointManifestList

type EndpointManifestList struct {
	Runtime
	Items []*EndpointManifest
}

func NewEndpointManifestList

func NewEndpointManifestList() *EndpointManifestList

type EndpointManifestMap

type EndpointManifestMap struct {
	Runtime
	Items map[string]*EndpointManifest
}

func NewEndpointManifestMap

func NewEndpointManifestMap() *EndpointManifestMap

type EndpointMap

type EndpointMap struct {
	Runtime
	Items map[string]*Endpoint
}

func NewEndpointMap

func NewEndpointMap() *EndpointMap

type EndpointMeta

type EndpointMeta struct {
	Meta
	// Namespace name
	Namespace string `json:"namespace"`
}

swagger:ignore EndpointMeta - endpoint meta data

type EndpointSpec

type EndpointSpec struct {
	// Endpoint state
	State     string               `json:"state"`
	External  bool                 `json:"external"`
	IP        string               `json:"ip"`
	Domain    string               `json:"domain"`
	PortMap   map[uint16]string    `json:"port_map"`
	Strategy  EndpointSpecStrategy `json:"strategy"`
	Policy    string               `json:"policy"`
	Upstreams []string             `json:"upstreams"`
}

EndpointSpec spec data swagger:model types_endpoint_spec

type EndpointSpecStrategy

type EndpointSpecStrategy struct {
	Route string `json:"route"`
	Bind  string `json:"bind"`
}

EndpointSpecStrategy describes route and bind swagger:model types_endpoint_spec_strategy

type EndpointState

type EndpointState struct {
	EndpointSpec
}

type EndpointStatus

type EndpointStatus struct {
	State string          `json:"state"`
	Ready map[string]bool `json:"ready"`
}

swagger:ignore EndpointStatus - endpoint status

type EndpointUpdateOptions

type EndpointUpdateOptions struct {
	IP            *string           `json:"ip"`
	Ports         map[uint16]string `json:"ports"`
	RouteStrategy string            `json:"route_strategy"`
	Policy        string            `json:"policy"`
	BindStrategy  string            `json:"bind_strategy"`
}

swagger:ignore

type EndpointUpstream

type EndpointUpstream struct {
	Host string `json:"host"`
	Port int    `json:"port"`
}

swagger:ignore EndpointUpstream describe endpoint backend data

type Event

type Event struct {
	Data interface{}
	// contains filtered or unexported fields
}

func (*Event) IsActionCreate

func (e *Event) IsActionCreate() bool

func (*Event) IsActionError

func (e *Event) IsActionError() bool

func (*Event) IsActionRemove

func (e *Event) IsActionRemove() bool

func (*Event) IsActionUpdate

func (e *Event) IsActionUpdate() bool

type Image

type Image struct {
	Meta   ImageMeta
	Status ImageStatus
	Spec   ImageSpec
}
func (i *Image) SelfLink() string

type ImageContainer

type ImageContainer struct {
	Ports []string
	Envs  []string
	Exec  SpecTemplateContainerExec
}

type ImageManifest

type ImageManifest struct {
	Name   string `json:"name" yaml:"name"`
	Tag    string `json:"tag" yaml:"tag"`
	Auth   string `json:"auth" yaml:"auth"`
	Policy string `json:"policy" yaml:"policy"`
}

type ImageMeta

type ImageMeta struct {
	ID     string   `json:"id"`
	Digest string   `json:"digest"`
	Name   string   `json:"name"`
	Tags   []string `json:"tags"`
}

type ImageSpec

type ImageSpec struct {
	// Name full name
	Name string `json:"name"`
	// Secret name for pulling
	Secret string `json:"auth"`
}

type ImageStatus

type ImageStatus struct {
	State       string         `json:"state"`
	Size        int64          `json:"size"`
	VirtualSize int64          `json:"virtual_size"`
	Container   ImageContainer `json:"container"`
}

type Ingress

type Ingress struct {
	Runtime
	Meta   IngressMeta   `json:"meta"`
	Status IngressStatus `json:"status"`
	Spec   IngressSpec   `json:"spec"`
}

swagger:ignore

func (n *Ingress) SelfLink() string

swagger:ignore

type IngressEvent

type IngressEvent struct {
	Data *Ingress
	// contains filtered or unexported fields
}

func (*IngressEvent) IsActionCreate

func (e *IngressEvent) IsActionCreate() bool

func (*IngressEvent) IsActionError

func (e *IngressEvent) IsActionError() bool

func (*IngressEvent) IsActionRemove

func (e *IngressEvent) IsActionRemove() bool

func (*IngressEvent) IsActionUpdate

func (e *IngressEvent) IsActionUpdate() bool

type IngressInfo

type IngressInfo struct {
	Type         string `json:"type"`
	Version      string `json:"version"`
	Hostname     string `json:"hostname"`
	Architecture string `json:"architecture"`

	OSName string `json:"os_name"`
	OSType string `json:"os_type"`

	// RewriteIP - need to set true if you want to use an external ip
	ExternalIP string `json:"external_ip"`
	InternalIP string `json:"internal_ip"`
}

type IngressList

type IngressList struct {
	Runtime
	Items []*Ingress
}

func NewIngressList

func NewIngressList() *IngressList

type IngressManifest

type IngressManifest struct {
	Meta      IngressManifestMeta          `json:"meta"`
	Resolvers map[string]*ResolverManifest `json:"resolvers"`
	Routes    map[string]*RouteManifest    `json:"routes"`
	Endpoints map[string]*EndpointManifest `json:"endpoints"`
	Network   map[string]*SubnetManifest   `json:"network"`
}

type IngressManifestMeta

type IngressManifestMeta struct {
	Initial bool `json:"initial"`
}

type IngressMap

type IngressMap struct {
	Runtime
	Items map[string]*Ingress
}

func NewIngressMap

func NewIngressMap() *IngressMap

type IngressMeta

type IngressMeta struct {
	Meta
	Node string `json:"node"`
}

swagger:ignore

type IngressSpec

type IngressSpec struct {
}

type IngressStatus

type IngressStatus struct {
	Ready  bool `json:"ready"`
	Online bool `json:"online"`
}

swagger:model types_ingress_status

type IngressStatusEvent

type IngressStatusEvent struct {
	Data *IngressStatus
	// contains filtered or unexported fields
}

func (*IngressStatusEvent) IsActionCreate

func (e *IngressStatusEvent) IsActionCreate() bool

func (*IngressStatusEvent) IsActionError

func (e *IngressStatusEvent) IsActionError() bool

func (*IngressStatusEvent) IsActionRemove

func (e *IngressStatusEvent) IsActionRemove() bool

func (*IngressStatusEvent) IsActionUpdate

func (e *IngressStatusEvent) IsActionUpdate() bool

type Meta

type Meta struct {
	// Meta name
	Name string `json:"name,omitempty",yaml:"name,omitempty"`
	// Meta description
	Description string `json:"description",yaml:"description"`
	// Meta self link
	SelfLink string `json:"self_link",yaml:"self_link"`
	// Meta labels
	Labels map[string]string `json:"labels",yaml:"labels"`
	// Meta created time
	Created time.Time `json:"created",yaml:"created"`
	// Meta updated time
	Updated time.Time `json:"updated",yaml:"updated"`
}

swagger:ignore swagger:model types_meta

func (*Meta) SetDefault

func (m *Meta) SetDefault()

type MetaCreateOptions

type MetaCreateOptions struct {
	Name        string            `json:"name",yaml:"name"`
	Description string            `json:"description",yaml:"description"`
	Labels      map[string]string `json:"labels",yaml:"labels"`
}

swagger:ignore swagger:model types_meta_create

type MetaUpdateOptions

type MetaUpdateOptions struct {
	Description *string           `json:"description",yaml:"description"`
	Labels      map[string]string `json:"labels",yaml:"labels"`
}

swagger:ignore swagger:model types_meta_update

type Namespace

type Namespace struct {
	Meta   NamespaceMeta   `json:"meta"`
	Status NamespaceStatus `json:"status"`
	Spec   NamespaceSpec   `json:"spec"`
}

swagger:ignore

func (*Namespace) AllocateResources

func (n *Namespace) AllocateResources(resources ResourceRequest) error

func (*Namespace) ReleaseResources

func (n *Namespace) ReleaseResources(resources ResourceRequest) error
func (n *Namespace) SelfLink() string

func (*Namespace) ToJson

func (n *Namespace) ToJson() ([]byte, error)

type NamespaceCreateOptions

type NamespaceCreateOptions struct {
	Name        string                     `json:"name"`
	Description string                     `json:"description"`
	Domain      *string                    `json:"domain"`
	Resources   *NamespaceResourcesOptions `json:"resources"`
}

swagger:ignore

type NamespaceDomain

type NamespaceDomain struct {
	Internal string `json:"internal"`
	External string `json:"external"`
}

type NamespaceEnv

type NamespaceEnv struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

swagger:ignore

type NamespaceEnvs

type NamespaceEnvs []NamespaceEnv

swagger:ignore

type NamespaceEvent

type NamespaceEvent struct {
	Data *Namespace
	// contains filtered or unexported fields
}

func (*NamespaceEvent) IsActionCreate

func (e *NamespaceEvent) IsActionCreate() bool

func (*NamespaceEvent) IsActionError

func (e *NamespaceEvent) IsActionError() bool

func (*NamespaceEvent) IsActionRemove

func (e *NamespaceEvent) IsActionRemove() bool

func (*NamespaceEvent) IsActionUpdate

func (e *NamespaceEvent) IsActionUpdate() bool

type NamespaceList

type NamespaceList struct {
	Runtime
	Items []*Namespace
}

swagger:ignore

func NewNamespaceList

func NewNamespaceList() *NamespaceList

func (*NamespaceList) ToJson

func (n *NamespaceList) ToJson() ([]byte, error)

type NamespaceMap

type NamespaceMap struct {
	Runtime
	Items map[string]*Namespace
}

swagger:ignore

func NewNamespaceMap

func NewNamespaceMap() *NamespaceMap

type NamespaceMeta

type NamespaceMeta struct {
	Meta     `yaml:",inline"`
	Endpoint string `json:"endpoint"`
	Type     string `json:"type"`
}

swagger:ignore swagger:model types_namespace_meta

type NamespaceRemoveOptions

type NamespaceRemoveOptions struct {
	Force bool `json:"force"`
}

swagger:ignore

type NamespaceResourcesOptions

type NamespaceResourcesOptions struct {
	Request *ResourceRequestItemOption `json:"request"`
	Limits  *ResourceRequestItemOption `json:"limits"`
}

swagger:ignore

type NamespaceSpec

type NamespaceSpec struct {
	Resources ResourceRequest `json:"resources"`
	Env       NamespaceEnvs   `json:"env"`
	Domain    NamespaceDomain `json:"domain"`
}

swagger:ignore

type NamespaceStatus

type NamespaceStatus struct {
	Resources NamespaceStatusResources `json:"resources"`
}

type NamespaceStatusResources

type NamespaceStatusResources struct {
	Allocated ResourceRequestItem `json:"usage"`
}

type NamespaceUpdateOptions

type NamespaceUpdateOptions struct {
	Description *string                    `json:"description"`
	Domain      *string                    `json:"domain"`
	Resources   *NamespaceResourcesOptions `json:"resources"`
}

swagger:ignore

type Network

type Network struct {
	Runtime
	Meta   Meta          `json:"meta"`
	Status NetworkStatus `json:"status"`
	Spec   NetworkSpec   `json:"spec"`
}

type NetworkEvent

type NetworkEvent struct {
	Data *Network
	// contains filtered or unexported fields
}

func (*NetworkEvent) IsActionCreate

func (e *NetworkEvent) IsActionCreate() bool

func (*NetworkEvent) IsActionError

func (e *NetworkEvent) IsActionError() bool

func (*NetworkEvent) IsActionRemove

func (e *NetworkEvent) IsActionRemove() bool

func (*NetworkEvent) IsActionUpdate

func (e *NetworkEvent) IsActionUpdate() bool

type NetworkInterface

type NetworkInterface struct {
	Index int    `json:"index"`
	Name  string `json:"name"`
	Addr  string `json:"addr"`
	HAddr string `json:"HAddr"`
}

swagger:model types_network_interface

type NetworkSettings

type NetworkSettings struct {
	// Container gatway ip address
	Gateway string `json:"gateway"`
	// Container ip address
	IPAddress string `json:"ip"`
	// Container ports mapping
	Ports []*SpecTemplateContainerPort `json:"ports"`
}

type NetworkSpec

type NetworkSpec struct {
}

type NetworkState

type NetworkState struct {
	SubnetSpec
}

type NetworkStatus

type NetworkStatus struct {
	State string `json:"state"`
}

type Node

type Node struct {
	Runtime
	Meta   NodeMeta   `json:"meta"`
	Status NodeStatus `json:"status"`
	Spec   NodeSpec   `json:"spec"`
}

swagger:ignore swagger:model types_node

func (n *Node) SelfLink() string

type NodeCreateMetaOptions

type NodeCreateMetaOptions struct {
	MetaCreateOptions
	Subnet   string `json:"subnet"`
	Token    string `json:"token"`
	Region   string `json:"region"`
	Provider string `json:"provider"`
}

swagger:ignore swagger:model types_node_meta_create

type NodeCreateOptions

type NodeCreateOptions struct {
	Meta     NodeCreateMetaOptions `json:"meta", yaml:"meta"`
	Info     NodeInfo              `json:"info", yaml:"info"`
	Status   NodeStatus            `json:"status", yaml:"status"`
	Security NodeSecurity          `json:"security", yaml:"security"`
}

swagger:ignore swagger:model types_node_create

type NodeEvent

type NodeEvent struct {
	Data *Node
	// contains filtered or unexported fields
}

func (*NodeEvent) IsActionCreate

func (e *NodeEvent) IsActionCreate() bool

func (*NodeEvent) IsActionError

func (e *NodeEvent) IsActionError() bool

func (*NodeEvent) IsActionRemove

func (e *NodeEvent) IsActionRemove() bool

func (*NodeEvent) IsActionUpdate

func (e *NodeEvent) IsActionUpdate() bool

type NodeInfo

type NodeInfo struct {
	Version      string `json:"version"`
	Hostname     string `json:"hostname"`
	Architecture string `json:"architecture"`

	OSName string `json:"os_name"`
	OSType string `json:"os_type"`

	// RewriteIP - need to set true if you want to use an external ip
	ExternalIP string `json:"external_ip"`
	InternalIP string `json:"internal_ip"`
	CIDR       string `json:"cidr"`
}

swagger:model types_node_info

type NodeList

type NodeList struct {
	Runtime
	Items []*Node
}

swagger:ignore swagger:model types_node_list

func NewNodeList

func NewNodeList() *NodeList

type NodeManifest

type NodeManifest struct {
	Meta      NodeManifestMeta             `json:"meta"`
	Resolvers map[string]*ResolverManifest `json:"resolvers"`
	Secrets   map[string]*SecretManifest   `json:"secrets"`
	Configs   map[string]*ConfigManifest   `json:"configs"`
	Endpoints map[string]*EndpointManifest `json:"endpoint"`
	Network   map[string]*SubnetManifest   `json:"network"`
	Pods      map[string]*PodManifest      `json:"pods"`
	Volumes   map[string]*VolumeManifest   `json:"volumes"`
}

type NodeManifestMeta

type NodeManifestMeta struct {
	Initial bool `json:"initial"`
}

type NodeMap

type NodeMap struct {
	Runtime
	Items map[string]*Node
}

swagger:ignore swagger:model types_node_map

func NewNodeMap

func NewNodeMap() *NodeMap

type NodeMeta

type NodeMeta struct {
	Meta
	NodeInfo
	Subnet  string `json:"subnet"`
	Cluster string `json:"cluster"`
}

swagger:ignore swagger:model types_node_meta

func (*NodeMeta) Set

func (m *NodeMeta) Set(meta *NodeUpdateMetaOptions)

type NodeMode

type NodeMode struct {
	Ingress bool `json:"ingress"`
}

type NodeResources

type NodeResources struct {
	// Node total containers
	Containers int `json:"containers"`
	// Node total pods
	Pods int `json:"pods"`
	// Node total memory
	Memory int64 `json:"memory"`
	// Node total cpu
	Cpu int `json:"cpu"`
	// Node storage
	Storage int64 `json:"storage"`
}

swagger:model types_node_resources

type NodeRole

type NodeRole struct {
	Router  NodeRoleRouter `json:"router"`
	Builder bool           `json:"builder"`
}

swagger:ignore swagger:model types_node_role

type NodeRoleRouter

type NodeRoleRouter struct {
	ExternalIP string `json:"external_ip"`
	Enabled    bool   `json:"enabled"`
}

swagger:ignore swagger:model types_node_role_router

type NodeSSL

type NodeSSL struct {
	CA   []byte `json:"ca"`
	Cert []byte `json:"cert"`
	Key  []byte `json:"key"`
}

type NodeSecurity

type NodeSecurity struct {
	TLS bool     `json:"tls"`
	SSL *NodeSSL `json:"ssl"`
}

type NodeSpec

type NodeSpec struct {
	Security NodeSecurity `json:"security"`
}

swagger:ignore swagger:model types_node_spec

type NodeStatus

type NodeStatus struct {
	// state
	State NodeStatusState `json:"state"`
	// node status online
	Online bool `json:"online"`
	// Node Capacity
	Capacity NodeResources `json:"capacity"`
	// Node Allocated
	Allocated NodeResources `json:"allocated"`
}

swagger:model types_node_status

type NodeStatusEvent

type NodeStatusEvent struct {
	Data *NodeStatus
	// contains filtered or unexported fields
}

func (*NodeStatusEvent) IsActionCreate

func (e *NodeStatusEvent) IsActionCreate() bool

func (*NodeStatusEvent) IsActionError

func (e *NodeStatusEvent) IsActionError() bool

func (*NodeStatusEvent) IsActionRemove

func (e *NodeStatusEvent) IsActionRemove() bool

func (*NodeStatusEvent) IsActionUpdate

func (e *NodeStatusEvent) IsActionUpdate() bool

type NodeStatusInterfaceState

type NodeStatusInterfaceState struct {
	Type    string `json:"type"`
	Version string `json:"version"`
	State   string `json:"state"`
	Message string `json:"message"`
}

type NodeStatusState

type NodeStatusState struct {
	CRI NodeStatusInterfaceState `json:"cri"`
	CNI NodeStatusInterfaceState `json:"cni"`
	CPI NodeStatusInterfaceState `json:"cpi"`
	CSI NodeStatusInterfaceState `json:"csi"`
}

type NodeTask

type NodeTask struct {
	Cancel context.CancelFunc
}

swagger:ignore swagger:model types_node_task

type NodeUpdateInfoOptions

type NodeUpdateInfoOptions struct {
	Hostname     *string `json:"hostname"`
	Architecture *string `json:"architecture"`
	OSName       *string `json:"os_name"`
	OSType       *string `json:"os_type"`
	ExternalIP   *string `json:"external_ip"`
	InternalIP   *string `json:"internal_ip"`
	CIDR         *string `json:"cidr"`
}

func (*NodeUpdateInfoOptions) Set

func (o *NodeUpdateInfoOptions) Set(i NodeInfo)

type NodeUpdateMetaOptions

type NodeUpdateMetaOptions struct {
	MetaUpdateOptions
	NodeUpdateInfoOptions
}

swagger:model types_node_meta_update

type Notification

type Notification struct {
	ID            string
	UserID        string
	ComponentType string
	ComponentID   string
	Service       string
	Channel       string
	Level1        int64
	Level2        int64
	Level3        int64
	Active        bool
}

type NotificationList

type NotificationList []*Notification

type NotificationMap

type NotificationMap map[string]*Notification

type NotifyChannel

type NotifyChannel struct {
	ID   string
	Name string
	Type string
}

type NotifyGroup

type NotifyGroup struct {
	ID   string
	Name string
	Type string
}

type Pod

type Pod struct {
	Runtime
	// Pod Meta
	Meta PodMeta `json:"meta" yaml:"meta"`
	// Pod Spec
	Spec PodSpec `json:"spec" yaml:"spec"`
	// Containers status info
	Status PodStatus `json:"status" yaml:"status"`
}

swagger:ignore swagger:model types_pod

func NewPod

func NewPod() *Pod
func (p *Pod) CreateSelfLink(namespace, service, deployment, name string) string
func (p *Pod) DeploymentLink() string
func (p *Pod) SelfLink() string
func (p *Pod) ServiceLink() string

type PodContainer

type PodContainer struct {
	// Pod container ID
	ID string `json:"id" yaml:"id"`
	// Pod ID
	Pod string `json:"pod" yaml:"pod"`
	// Pod container name
	Name string `json:"name" yaml:"name"`
	// Pod container exec
	Exec SpecTemplateContainerExec `json:"exec" yaml:"exec"`
	// Pod container state
	State PodContainerState `json:"state" yaml:"state"`
	// Pod container ready
	Ready bool `json:"ready" yaml:"ready"`
	// Pod container restart count
	Restart struct {
		Policy  string `json:"policy"`
		Attempt int    `json:"count"`
	} `json:"restart" yaml:"restart"`
	// Pod container image meta
	Image PodContainerImage `json:"image" yaml:"image"`
	// Pod container envs
	Envs []string `json:"-"`
	// Pod container binds
	Binds []string `json:"-"`
	// Pod container ports
	Ports []*SpecTemplateContainerPort `json:"ports"`
}

PodContainer is a container of the pod swagger:model types_pod_container

func (*PodContainer) GetManifest

func (c *PodContainer) GetManifest() *ContainerManifest

type PodContainerImage

type PodContainerImage struct {
	// Pod container image ID
	ID string `json:"id" yaml:"id"`
	// Pod container image name
	Name string `json:"name" yaml:"name"`
}

swagger:model types_pod_container_image

type PodContainerState

type PodContainerState struct {
	// Container restart state
	Restarted PodContainerStateRestarted `json:"restarted" yaml:"restarted"`
	// Container create state
	Created PodContainerStateCreated `json:"created" yaml:"created"`

	// Container started state
	Started PodContainerStateStarted `json:"started" yaml:"started"`

	// Container stopped state
	Stopped PodContainerStateStopped `json:"stopped" yaml:"stopped"`

	// Container error state
	Error PodContainerStateError `json:"error" yaml:"error"`
}

swagger:model types_pod_container_state

type PodContainerStateCreated

type PodContainerStateCreated struct {
	Created time.Time `json:"created" yaml:"created"`
}

swagger:model types_pod_container_state_created

type PodContainerStateError

type PodContainerStateError struct {
	Error   bool                  `json:"error" yaml:"error"`
	Message string                `json:"message" yaml:"message"`
	Exit    PodContainerStateExit `json:"exit" yaml:"exit"`
}

swagger:model types_pod_container_state_error

type PodContainerStateExit

type PodContainerStateExit struct {
	Code      int       `json:"code" yaml:"code"`
	Timestamp time.Time `json:"timestamp" yaml:"timestamp"`
}

swagger:model types_pod_container_state_exit

type PodContainerStateRestarted

type PodContainerStateRestarted struct {
	Count     int       `json:"count" yaml:"count"`
	Restarted time.Time `json:"restarted" yaml:"restarted"`
}

swagger:model types_pod_container_state_restarted

type PodContainerStateStarted

type PodContainerStateStarted struct {
	Started   bool      `json:"started" yaml:"started"`
	Timestamp time.Time `json:"timestamp" yaml:"timestamp"`
}

swagger:model types_pod_container_state_started

type PodContainerStateStopped

type PodContainerStateStopped struct {
	Stopped bool                  `json:"stopped" yaml:"stopped"`
	Exit    PodContainerStateExit `json:"exit" yaml:"exit"`
}

swagger:model types_pod_container_state_stopped

type PodEvent

type PodEvent struct {
	Data *Pod
	// contains filtered or unexported fields
}

func (*PodEvent) IsActionCreate

func (e *PodEvent) IsActionCreate() bool

func (*PodEvent) IsActionError

func (e *PodEvent) IsActionError() bool

func (*PodEvent) IsActionRemove

func (e *PodEvent) IsActionRemove() bool

func (*PodEvent) IsActionUpdate

func (e *PodEvent) IsActionUpdate() bool

type PodList

type PodList struct {
	Runtime
	Items []*Pod
}

func NewPodList

func NewPodList() *PodList

type PodManifest

type PodManifest PodSpec

type PodManifestEvent

type PodManifestEvent struct {
	Node string
	Data *PodManifest
	// contains filtered or unexported fields
}

func (*PodManifestEvent) IsActionCreate

func (e *PodManifestEvent) IsActionCreate() bool

func (*PodManifestEvent) IsActionError

func (e *PodManifestEvent) IsActionError() bool

func (*PodManifestEvent) IsActionRemove

func (e *PodManifestEvent) IsActionRemove() bool

func (*PodManifestEvent) IsActionUpdate

func (e *PodManifestEvent) IsActionUpdate() bool

type PodManifestList

type PodManifestList struct {
	Runtime
	Items []*PodManifest
}

func NewPodManifestList

func NewPodManifestList() *PodManifestList

type PodManifestMap

type PodManifestMap struct {
	Runtime
	Items map[string]*PodManifest
}

func NewPodManifestMap

func NewPodManifestMap() *PodManifestMap

type PodMap

type PodMap struct {
	Runtime
	Items map[string]*Pod
}

func NewPodMap

func NewPodMap() *PodMap

type PodMeta

type PodMeta struct {
	Meta `yaml:",inline"`
	// Pod SelfLink
	SelfLink string `json:"self_link" yaml:"self_link"`
	// Pod deployment
	Deployment string `json:"deployment" yaml:"deployment"`
	// Pod service
	Service string `json:"service" yaml:"service"`
	// Pod service id
	Namespace string `json:"namespace" yaml:"namespace"`
	// Pod node hostname
	Node string `json:"node" yaml:"node"`
	// Pod status
	Status string `json:"status" yaml:"status"`
	// Endpoint
	Endpoint string `json:"endpoint" yaml:"endpoint"`
}

swagger:ignore PodMeta is a meta of pod swagger:model types_pod_meta

type PodNetwork

type PodNetwork struct {
	// Pod host IP
	HostIP string `json:"host_ip" yaml:"host_ip"`
	// Pod IP
	PodIP string `json:"pod_ip" yaml:"pod_ip"`
}

swagger:model types_pod_network

type PodSpec

type PodSpec struct {
	Local    bool         `json:"local,omitempty"`
	State    SpecState    `json:"state"`
	Selector SpecSelector `json:"selector"`
	Template SpecTemplate `json:"template" yaml:"template"`
}

PodSpec is a spec of pod swagger:model types_pod_spec

type PodStatus

type PodStatus struct {
	// Pod type
	Local bool `json:"local" yaml:"local"`
	// Pod state
	State string `json:"state" yaml:"state"`
	// Pod status
	Status string `json:"status" yaml:"status"`
	// Pod state
	Running bool `json:"running" yaml:"state"`
	// Pod state message
	Message string `json:"message" yaml:"message"`
	// Pod steps
	Steps PodSteps `json:"steps" yaml:"steps"`
	// Pod network
	Network PodNetwork `json:"network" yaml:"network"`
	// Pod containers
	Containers map[string]*PodContainer `json:"containers" yaml:"containers"`
	// Pod volumes
	Volumes map[string]*VolumeClaim `json:"volumes" yaml:"volumes"`
}

swagger:ignore PodSpecStatus is a status of pod swagger:model types_pod_status

func NewPodStatus

func NewPodStatus() *PodStatus

func (*PodStatus) SetCreated

func (s *PodStatus) SetCreated()

func (*PodStatus) SetDestroy

func (s *PodStatus) SetDestroy()

func (*PodStatus) SetDestroyed

func (s *PodStatus) SetDestroyed()

func (*PodStatus) SetError

func (s *PodStatus) SetError(err error)

func (*PodStatus) SetInitialized

func (s *PodStatus) SetInitialized()

func (*PodStatus) SetProvision

func (s *PodStatus) SetProvision()

func (*PodStatus) SetPull

func (s *PodStatus) SetPull()

func (*PodStatus) SetRunning

func (s *PodStatus) SetRunning()

func (*PodStatus) SetStarting

func (s *PodStatus) SetStarting()

func (*PodStatus) SetStopped

func (s *PodStatus) SetStopped()

type PodStep

type PodStep struct {
	// Pod step ready
	Ready bool `json:"ready" yaml:"ready"`
	// Pod step timestamp
	Timestamp time.Time `json:"timestamp" yaml:"timestamp"`
}

swagger:model types_pod_step

type PodSteps

type PodSteps map[string]PodStep

PodSteps is a map of pod steps swagger:model types_pod_step_map

type Port

type Port struct {
	// HostIP is the host IP Address
	HostIP string `json:"host_ip"`
	// HostPort is the host port number
	HostPort string `json:"host_port"`
}

type Process

type Process struct {
	Runtime
	// Process Meta
	Meta ProcessMeta `json:"meta"`
	// Process status
	Status ProcessStatus `json:"status"`
}

type ProcessMeta

type ProcessMeta struct {
	// Include default Meta struct
	Meta `json:"id" `

	ID string `json:"id" `

	// Process PID
	PID int `json:"pid" `

	// Process Master state
	Lead bool `json:"lead" `
	// Process Slave state
	Slave bool `json:"slave" `

	// Process registered type
	Kind string `json:"kind" `
	// Process registered hostname
	Hostname string `json:"hostname" `
}

type ProcessStatus

type ProcessStatus struct{}

type ResolverManifest

type ResolverManifest struct {
	IP   string `json:"ip"`
	Port uint16 `json:"port"`
}

type ResourceRequest

type ResourceRequest struct {
	Request ResourceRequestItem `json:"request"`
	Limits  ResourceRequestItem `json:"limits"`
}

func (*ResourceRequest) Equal

func (r *ResourceRequest) Equal(rr ResourceRequest) bool

type ResourceRequestItem

type ResourceRequestItem struct {
	RAM     string `json:"ram"`
	CPU     string `json:"cpu"`
	Storage string `json:"storage"`
}

swagger:ignore

type ResourceRequestItemOption

type ResourceRequestItemOption struct {
	RAM     *string `json:"ram"`
	CPU     *string `json:"cpu"`
	Storage *string `json:"storage"`
}

swagger:ignore

type Route

type Route struct {
	Runtime
	Meta   RouteMeta   `json:"meta" yaml:"meta"`
	Status RouteStatus `json:"status" yaml:"status"`
	Spec   RouteSpec   `json:"spec" yaml:"spec"`
}

Route swagger:ignore swagger:model types_route

func (r *Route) CreateSelfLink(namespace, name string) string
func (r *Route) SelfLink() string

type RouteEvent

type RouteEvent struct {
	Data *Route
	// contains filtered or unexported fields
}

func (*RouteEvent) IsActionCreate

func (e *RouteEvent) IsActionCreate() bool

func (*RouteEvent) IsActionError

func (e *RouteEvent) IsActionError() bool

func (*RouteEvent) IsActionRemove

func (e *RouteEvent) IsActionRemove() bool

func (*RouteEvent) IsActionUpdate

func (e *RouteEvent) IsActionUpdate() bool

type RouteList

type RouteList struct {
	Runtime
	Items []*Route
}

swagger:ignore

func NewRouteList

func NewRouteList() *RouteList

type RouteManifest

type RouteManifest struct {
	State    string      `json:"state"`
	Domain   string      `json:"domain"`
	Port     uint16      `json:"port"`
	Endpoint string      `json:"endpoint"`
	Rules    []RouteRule `json:"rules"`
}

func (*RouteManifest) Set

func (r *RouteManifest) Set(route *Route)

type RouteManifestEvent

type RouteManifestEvent struct {
	Ingress string
	Data    *RouteManifest
	// contains filtered or unexported fields
}

func (*RouteManifestEvent) IsActionCreate

func (e *RouteManifestEvent) IsActionCreate() bool

func (*RouteManifestEvent) IsActionError

func (e *RouteManifestEvent) IsActionError() bool

func (*RouteManifestEvent) IsActionRemove

func (e *RouteManifestEvent) IsActionRemove() bool

func (*RouteManifestEvent) IsActionUpdate

func (e *RouteManifestEvent) IsActionUpdate() bool

type RouteManifestList

type RouteManifestList struct {
	Runtime
	Items []*RouteManifest
}

func NewRouteManifestList

func NewRouteManifestList() *RouteManifestList

type RouteManifestMap

type RouteManifestMap struct {
	Runtime
	Items map[string]*RouteManifest
}

func NewRouteManifestMap

func NewRouteManifestMap() *RouteManifestMap

type RouteMap

type RouteMap struct {
	Runtime
	Items map[string]*Route
}

swagger:ignore

func NewRouteMap

func NewRouteMap() *RouteMap

type RouteMeta

type RouteMeta struct {
	Meta      `yaml:",inline"`
	Namespace string `json:"namespace" yaml:"namespace"`
	Ingress   string `json:"ingress" yaml:"ingress"`
}

swagger:ignore swagger:model types_route_meta

type RouteRule

type RouteRule struct {
	Service  string `json:"service" yaml:"service"`
	Path     string `json:"path" yaml:"path"`
	Endpoint string `json:"endpoint" yaml:"endpoint"`
	Port     int    `json:"port" yaml:"port"`
}

swagger:model types_route_rule

type RouteSelector

type RouteSelector struct {
	Ingress string            `json:"ingress" yaml:"ingress"`
	Label   map[string]string `json:"label" yaml:"label"`
}

type RouteSpec

type RouteSpec struct {
	Selector RouteSelector `json:"selector" yaml:"selector"`
	State    string        `json:"state" yaml:"state"`
	Domain   string        `json:"domain" yaml:"domain"`
	Port     uint16        `json:"port" yaml:"port"`
	Rules    []RouteRule   `json:"rules" yaml:"rules"`
	Updated  time.Time     `json:"updated"`
}

swagger:model types_route_spec

type RouteStatus

type RouteStatus struct {
	State   string `json:"state" yaml:"state"`
	Message string `json:"message" yaml:"message"`
}

swagger:ignore swagger:model types_route_status RouteStatus - status of current route state

type Runtime

type Runtime struct {
	System RuntimeSystem `json:"-"`
}

type RuntimeSystem

type RuntimeSystem struct {
	Revision int64  `json:"-"`
	Key      string `json:"-"`
}

type Secret

type Secret struct {
	Runtime
	Meta SecretMeta `json:"meta" yaml:"meta"`
	Spec SecretSpec `json:"spec" yaml:"yaml"`
}

swagger:ignore swagger:model types_secret

func (s *Secret) CreateSelfLink(namespace, name string) string

func (*Secret) DecodeRegistry

func (s *Secret) DecodeRegistry()

func (*Secret) DecodeSecretAuthData

func (s *Secret) DecodeSecretAuthData() (*SecretAuthData, error)

func (*Secret) DecodeSecretTextData

func (s *Secret) DecodeSecretTextData(key string) (string, error)

func (*Secret) EncodeSecretAuthData

func (s *Secret) EncodeSecretAuthData(d SecretAuthData)

func (*Secret) GetHash

func (s *Secret) GetHash() string
func (s *Secret) SelfLink() string

type SecretAuthData

type SecretAuthData struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type SecretCreateOptions

type SecretCreateOptions struct {
	Name string
	Kind string
	Data map[string][]byte
}

swagger:ignore

type SecretEvent

type SecretEvent struct {
	Data *Secret
	// contains filtered or unexported fields
}

func (*SecretEvent) IsActionCreate

func (e *SecretEvent) IsActionCreate() bool

func (*SecretEvent) IsActionError

func (e *SecretEvent) IsActionError() bool

func (*SecretEvent) IsActionRemove

func (e *SecretEvent) IsActionRemove() bool

func (*SecretEvent) IsActionUpdate

func (e *SecretEvent) IsActionUpdate() bool

type SecretFile

type SecretFile struct {
	Files map[string][]byte `json:"text"`
}

type SecretList

type SecretList struct {
	Runtime
	Items []*Secret
}

swagger:ignore

func NewSecretList

func NewSecretList() *SecretList

type SecretManifest

type SecretManifest struct {
	Runtime
	State   string    `json:"state"`
	Type    string    `json:"type"`
	Created time.Time `json:"created"`
	Updated time.Time `json:"updated"`
}

type SecretManifestEvent

type SecretManifestEvent struct {
	Data *SecretManifest
	// contains filtered or unexported fields
}

func (*SecretManifestEvent) IsActionCreate

func (e *SecretManifestEvent) IsActionCreate() bool

func (*SecretManifestEvent) IsActionError

func (e *SecretManifestEvent) IsActionError() bool

func (*SecretManifestEvent) IsActionRemove

func (e *SecretManifestEvent) IsActionRemove() bool

func (*SecretManifestEvent) IsActionUpdate

func (e *SecretManifestEvent) IsActionUpdate() bool

type SecretManifestList

type SecretManifestList struct {
	Runtime
	Items []*SecretManifest
}

func NewSecretManifestList

func NewSecretManifestList() *SecretManifestList

type SecretManifestMap

type SecretManifestMap struct {
	Runtime
	Items map[string]*SecretManifest
}

func NewSecretManifestMap

func NewSecretManifestMap() *SecretManifestMap

type SecretMap

type SecretMap struct {
	Runtime
	Items map[string]*Secret
}

swagger:ignore

func NewSecretMap

func NewSecretMap() *SecretMap

type SecretMeta

type SecretMeta struct {
	Meta      `yaml:",inline"`
	Namespace string `json:"namespace" yaml:"namespace"`
}

swagger:ignore swagger:model types_secret_meta

type SecretRemoveOptions

type SecretRemoveOptions struct {
	Force bool `json:"force"`
}

swagger:ignore

type SecretSpec

type SecretSpec struct {
	Type string            `json:"type"`
	Data map[string][]byte `json:"data" yaml:"data"`
}

type SecretText

type SecretText struct {
	Text string `json:"text"`
}

type SecretUpdateOptions

type SecretUpdateOptions struct {
	Kind string
	Data map[string][]byte
}

swagger:ignore

type Service

type Service struct {
	Runtime
	Meta   ServiceMeta   `json:"meta"`
	Status ServiceStatus `json:"status"`
	Spec   ServiceSpec   `json:"spec"`
}
func (s *Service) CreateSelfLink(namespace, name string) string
func (s *Service) SelfLink() string

type ServiceEndpoint

type ServiceEndpoint struct {
	Name string `json:"name"`
	Main bool   `json:"main"`
}

type ServiceEnvFromOption

type ServiceEnvFromOption struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

type ServiceEnvOption

type ServiceEnvOption struct {
	Name  string               `json:"name"`
	Value string               `json:"value"`
	From  ServiceEnvFromOption `json:"from"`
}

type ServiceEvent

type ServiceEvent struct {
	Data *Service
	// contains filtered or unexported fields
}

func (*ServiceEvent) IsActionCreate

func (e *ServiceEvent) IsActionCreate() bool

func (*ServiceEvent) IsActionError

func (e *ServiceEvent) IsActionError() bool

func (*ServiceEvent) IsActionRemove

func (e *ServiceEvent) IsActionRemove() bool

func (*ServiceEvent) IsActionUpdate

func (e *ServiceEvent) IsActionUpdate() bool

type ServiceImageSpec

type ServiceImageSpec struct {
	Name   *string `json:"image"`
	Secret *string `json:"secret"`
}

type ServiceList

type ServiceList struct {
	Runtime
	Items []*Service
}

func NewServiceList

func NewServiceList() *ServiceList

type ServiceManifest

type ServiceManifest struct {
	Meta ServiceMeta `json:"meta"`
}

type ServiceMap

type ServiceMap struct {
	Runtime
	Items map[string]*Service
}

func NewServiceMap

func NewServiceMap() *ServiceMap

type ServiceMeta

type ServiceMeta struct {
	Meta
	Namespace string `json:"namespace"`
	SelfLink  string `json:"self_link"`
	Endpoint  string `json:"endpoint"`
	IP        string `json:"ip"`
}

type ServiceOptionsSpec

type ServiceOptionsSpec struct {
	Replicas   *int                `json:"replicas"`
	Memory     *int64              `json:"memory,omitempty"`
	Entrypoint *string             `json:"entrypoint,omitempty"`
	Command    *string             `json:"command,omitempty"`
	EnvVars    *[]ServiceEnvOption `json:"env,omitempty"`
	Ports      map[uint16]string   `json:"ports,omitempty"`
}

type ServiceRemoveOptions

type ServiceRemoveOptions struct {
	Force bool `json:"force"`
}

type ServiceReplicas

type ServiceReplicas struct {
	Total     int `json:"total"`
	Provision int `json:"provision"`
	Created   int `json:"created"`
	Started   int `json:"started"`
	Stopped   int `json:"stopped"`
	Errored   int `json:"errored"`
}

type ServiceSpec

type ServiceSpec struct {
	Replicas int          `json:"replicas" yaml:"replicas"`
	State    SpecState    `json:"state" yaml:"state"`
	Network  SpecNetwork  `json:"network" yaml:"network" `
	Strategy SpecStrategy `json:"strategy" yaml:"strategy"`
	Selector SpecSelector `json:"selector" yaml:"selector"`
	Template SpecTemplate `json:"template" yaml:"template"`
}

func (*ServiceSpec) GetResourceRequest

func (s *ServiceSpec) GetResourceRequest() ResourceRequest

func (*ServiceSpec) SetDefault

func (s *ServiceSpec) SetDefault()

type ServiceSpecStrategy

type ServiceSpecStrategy struct {
	Type           string                            `json:"type"` // Rolling
	RollingOptions ServiceSpecStrategyRollingOptions `json:"rollingOptions"`
	Resources      ServiceSpecStrategyResources      `json:"resources"`
	Deadline       int                               `json:"deadline"`
}

type ServiceSpecStrategyResources

type ServiceSpecStrategyResources struct{}

type ServiceSpecStrategyRollingOptions

type ServiceSpecStrategyRollingOptions struct {
	PeriodUpdate   int `json:"period_update"`
	Interval       int `json:"interval"`
	Timeout        int `json:"timeout"`
	MaxUnavailable int `json:"max_unavailable"`
	MaxSurge       int `json:"max_surge"`
}

type ServiceStatus

type ServiceStatus struct {
	State   string               `json:"state"`
	Message string               `json:"message"`
	Network ServiceStatusNetwork `json:"network"`
}

type ServiceStatusNetwork

type ServiceStatusNetwork struct {
	IP string `json:"ip"`
}

type SpecBuildImage

type SpecBuildImage struct {
	Tags           []string
	NoCache        bool
	Memory         int64
	Dockerfile     string
	SuppressOutput bool
	AuthConfigs    map[string]AuthConfig
	Context        io.Reader
	ExtraHosts     []string // List of extra hosts
}

swagger:ignore SpecBuildImage is an image of the spec build swagger:model types_spec_build_image

type SpecNetwork

type SpecNetwork struct {
	IP       string               `json:"ip"`
	Ports    map[uint16]string    `json:"ports"`
	Strategy EndpointSpecStrategy `json:"strategy"`
	Policy   string               `json:"policy"`
	// Spec updated time
	Updated time.Time `json:"updated"`
}

SpecNetwork is a map of spec template for network swagger:model types_spec_template_network

type SpecSelector

type SpecSelector struct {
	Labels map[string]string `json:"labels"`

	Node string `json:"node"`
	// Spec updated time
	Updated time.Time `json:"updated"`
}

swagger:model types_spec_selector

type SpecState

type SpecState struct {
	Destroy     bool `json:"destroy"`
	Maintenance bool `json:"maintenance"`
}

SpecState is a state of the spec swagger:model types_spec_state

type SpecStrategy

type SpecStrategy struct {
	Type           string                     `json:"type"` // Rolling
	RollingOptions SpecStrategyRollingOptions `json:"rollingOptions"`
	Resources      SpecStrategyResources      `json:"resources"`
	Deadline       int                        `json:"deadline"`
	// Spec updated time
	Updated time.Time `json:"updated"`
}

swagger:model types_spec_strategy

type SpecStrategyResources

type SpecStrategyResources struct {
}

swagger:model types_spec_strategy_resources

type SpecStrategyRollingOptions

type SpecStrategyRollingOptions struct {
	PeriodUpdate   int `json:"period_update"`
	Interval       int `json:"interval"`
	Timeout        int `json:"timeout"`
	MaxUnavailable int `json:"max_unavailable"`
	MaxSurge       int `json:"max_surge"`
}

swagger:model types_spec_strategy_rolling

type SpecTemplate

type SpecTemplate struct {
	// Template spec for volume
	Volumes SpecTemplateVolumeList `json:"volumes" yaml:"volumes"`
	// Template main container
	Containers SpecTemplateContainers `json:"containers" yaml:"containers"`
	// Termination period
	Termination int `json:"termination" yaml:"termination"`
	// Spec updated time
	Updated time.Time `json:"updated" yaml:"updated"`
}

SpecTemplate is a template of the spec swagger:model types_spec_template

func (*SpecTemplate) SetDefault

func (s *SpecTemplate) SetDefault()

type SpecTemplateConfigVolume

type SpecTemplateConfigVolume struct {
	// Secret name to mount
	Name string `json:"name"`
	// Config file binding
	Binds []SpecTemplateConfigVolumeBind `json:"binds"`
}

type SpecTemplateConfigVolumeBind

type SpecTemplateConfigVolumeBind struct {
	// Config key
	Key string `json:"key"`
	// File to create
	File string `json:"file"`
}

type SpecTemplateContainer

type SpecTemplateContainer struct {
	// Template container id
	ID string `json:"id" yaml:"id"`
	// Template container name
	Name string `json:"name" yaml:"name"`
	// Template container role
	Role string `json:"role" yaml:"role"`
	// Automatically remove container when it exits
	AutoRemove bool `json:"autoremove" yaml:"autoremove"`
	// Labels list
	Labels map[string]string `json:"labels" yaml:"labels"`
	// Template container image
	Image SpecTemplateContainerImage `json:"image" yaml:"image"`
	// Template container ports binding
	Ports SpecTemplateContainerPorts `json:"ports" yaml:"ports"`
	// Template container envs
	EnvVars SpecTemplateContainerEnvs `json:"env" yaml:"env"`
	// Template container resources
	Resources SpecTemplateContainerResources `json:"resources" yaml:"resources"`
	// Template container exec options
	Exec SpecTemplateContainerExec `json:"exec" yaml:"exec"`
	// Template container volumes
	Volumes SpecTemplateContainerVolumes `json:"volumes" yaml:"volumes"`
	// Template container probes
	Probes SpecTemplateContainerProbes `json:"probes" yaml:"probes"`
	// Template container security
	Security SpecTemplateContainerSecurity `json:"security" yaml:"security"`
	// Subnet container settings
	Network SpecTemplateContainerNetwork `json:"network" yaml:"network"`
	// Container DNS configuration
	DNS SpecTemplateContainerDNS `json:"dns" yaml:"dns"`
	// List of extra hosts
	ExtraHosts []string `json:"extra_hosts" yaml:"extra_hosts"`
	// Should docker publish all exposed port for the container
	PublishAllPorts bool `json:"publish" yaml:"publish"`
	// Links to another containers
	Links []SpecTemplateContainerLink `json:"links" yaml:"links"`
	// Restart Policy
	RestartPolicy SpecTemplateRestartPolicy `json:"restart" yaml:"restart"`
}

swagger:model types_spec_template_container

func (*SpecTemplateContainer) SetDefault

func (s *SpecTemplateContainer) SetDefault()

type SpecTemplateContainerDNS

type SpecTemplateContainerDNS struct {
	// List of DNS servers
	Server []string `json:"server"`
	// DNS server search options
	Search []string `json:"search"`
	// DNS server other options
	Options []string `json:"options"`
}

swagger:model types_spec_template_container_dns

type SpecTemplateContainerEnv

type SpecTemplateContainerEnv struct {
	Name   string                         `json:"name"`
	Value  string                         `json:"value,omitempty"`
	Secret SpecTemplateContainerEnvSecret `json:"secret,omitempty"`
	Config SpecTemplateContainerEnvConfig `json:"config,omitempty"`
}

swagger:model types_spec_template_container_env

type SpecTemplateContainerEnvConfig

type SpecTemplateContainerEnvConfig struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

type SpecTemplateContainerEnvSecret

type SpecTemplateContainerEnvSecret struct {
	Name string `json:"name"`
	Key  string `json:"key"`
}

swagger:model types_spec_template_container_env_secret

type SpecTemplateContainerEnvs

type SpecTemplateContainerEnvs []*SpecTemplateContainerEnv

SpecTemplateContainerPorts is a list of spec template container env vars swagger:model types_spec_template_container_env_list

func (*SpecTemplateContainerEnvs) ToLinuxFormat

func (s *SpecTemplateContainerEnvs) ToLinuxFormat() []string

type SpecTemplateContainerExec

type SpecTemplateContainerExec struct {
	Command []string `json:"command"`
	// Container enrtypoint
	Entrypoint []string `json:"entrypoint"`
	// Container run workdir option
	Workdir string `json:"workdir"`
	// Container run command arguments
	Args []string `json:"args"`
}

swagger:model types_spec_template_container_exec

type SpecTemplateContainerImage

type SpecTemplateContainerImage struct {
	Name   string `json:"name" yaml:"name"`
	Secret string `json:"secret" yaml:"secret"`
	Policy string `json:"policy" yaml:"policy"`
}

swagger:model types_spec_template_container_image

type SpecTemplateContainerLink struct {
	// Link name
	Link string `json:"link"`
	// Container alias
	Alias string `json:"alias"`
}

swagger:model types_spec_template_container_link

type SpecTemplateContainerNetwork

type SpecTemplateContainerNetwork struct {
	// Container hostname
	Hostname string `json:"hostname"`
	// Container host domain
	Domain string `json:"domain"`
	// Subnet ID to use
	Network string `json:"network"`
	// Subnet Mode to use
	Mode string `json:"mode"`
}

swagger:model types_spec_template_container_network

type SpecTemplateContainerPort

type SpecTemplateContainerPort struct {
	// Container port
	ContainerPort uint16 `json:"container_port"`
	// Host port
	HostPort uint16 `json:"host_port"`
	// Host port
	HostIP string `json:"host_port"`
	// Binding protocol
	Protocol string `json:"protocol"`
}

SpecTemplateContainerPort is a port of the spec template container swagger:model types_spec_template_container_port

func (*SpecTemplateContainerPort) Parse

func (s *SpecTemplateContainerPort) Parse(p string)

type SpecTemplateContainerPorts

type SpecTemplateContainerPorts []*SpecTemplateContainerPort

SpecTemplateContainerPorts is a list of spec template container ports swagger:model types_spec_template_container_port_list

type SpecTemplateContainerProbe

type SpecTemplateContainerProbe struct {
	// Exec command to check container liveness
	Exec struct {
		Command []string `json:"command"`
	} `json:"exec"`

	Socket struct {
		Protocol string `json:"protocol"`
		Port     int    `json:"port"`
	} `json:"socket"`

	InitialDelaySeconds int `json:"initial_delay"`
	TimeoutSeconds      int `json:"timeout_seconds"`
	PeriodSeconds       int `json:"period_seconds"`
	ThresholdSuccess    int `json:"threshold_success"`
	ThresholdFailure    int `json:"threshold_failure"`
}

swagger:model types_spec_template_container_probe

type SpecTemplateContainerProbes

type SpecTemplateContainerProbes struct {
	LiveProbe SpecTemplateContainerProbe `json:"live_probe"`
	ReadProbe SpecTemplateContainerProbe `json:"read_probe"`
}

swagger:model types_spec_template_container_probes

type SpecTemplateContainerResource

type SpecTemplateContainerResource struct {
	// CPU resource option
	CPU int64 `json:"cpu"`
	// RAM resource option
	RAM int64 `json:"ram"`
}

swagger:model types_spec_template_container_resource

type SpecTemplateContainerResources

type SpecTemplateContainerResources struct {
	// Limit resources
	Limits SpecTemplateContainerResource `json:"limits"`
	// Request resources
	Request SpecTemplateContainerResource `json:"quota"`
}

swagger:model types_spec_template_container_resources

type SpecTemplateContainerSecurity

type SpecTemplateContainerSecurity struct {
	// Start container in priveleged mode
	Privileged bool `json:"privileged"`
	// Add linux security options
	LinuxOptions SpecTemplateContainerSecurityLinuxOptions `json:"linux_options"`
	// Run container as particular user
	User int `json:"user"`
}

swagger:model types_spec_template_container_security

type SpecTemplateContainerSecurityLinuxOptions

type SpecTemplateContainerSecurityLinuxOptions struct {
	Level string `json:"level"`
}

swagger:model types_spec_template_container_security_linux

type SpecTemplateContainerVolume

type SpecTemplateContainerVolume struct {
	// Volume name
	Name string `json:"name"`
	// Volume mount mode
	Mode string `json:"mode"`
	// Volume mount path
	Path string `json:"path"`
}

swagger:model types_spec_template_container_volume

type SpecTemplateContainerVolumes

type SpecTemplateContainerVolumes []*SpecTemplateContainerVolume

SpecTemplateContainerVolumes is a list of spec template container volumes swagger:model types_spec_template_container_volume_list

type SpecTemplateContainers

type SpecTemplateContainers []*SpecTemplateContainer

SpecTemplateContainers is a list of spec template containers swagger:model types_spec_template_container_list

type SpecTemplateRestartPolicy

type SpecTemplateRestartPolicy struct {
	// Restart policy name
	Policy string `json:"policy" yaml:"policy"`
	// Attempt period
	Attempt int `json:"attempt" yaml:"attempt"`
}

swagger:model types_spec_template_policy

type SpecTemplateSecretVolume

type SpecTemplateSecretVolume struct {
	// Secret name to mount
	Name string `json:"name"`
	// Secret file key
	Binds []SpecTemplateSecretVolumeBind `json:"binds"`
}

SpecTemplateSecretVolume - use secret as volume in pod

type SpecTemplateSecretVolumeBind

type SpecTemplateSecretVolumeBind struct {
	Key  string `json:"key"`
	File string `json:"file"`
}

SpecTemplateSecretVolumeBind - files bindings. Get secret value by key and create file

type SpecTemplateVolume

type SpecTemplateVolume struct {
	// Template volume name
	Name string `json:"name"`
	// Template volume name
	Type string `json:"type"`
	// Template volume from persistent volume
	Volume SpecTemplateVolumeClaim `json:"volume,omitempty"`
	// Template volume from secret type
	Secret SpecTemplateSecretVolume `json:"secret,omitempty"`
	// Template volume from config type
	Config SpecTemplateConfigVolume `json:"config,omitempty"`
}

swagger:model types_spec_template_volume

type SpecTemplateVolumeClaim

type SpecTemplateVolumeClaim struct {
	// Persistent volume name to mount
	Name string `json:"name"`
	// Persistent Volume Subpath
	Subpath string `json:"subpath"`
}

SpecTemplateVolumeClaim - volume bind to use persistent volume in pod swagger:model types_spec_template_volume_claim

type SpecTemplateVolumeList

type SpecTemplateVolumeList []*SpecTemplateVolume

SpecTemplateVolumeList is a list of spec template volumes swagger:model types_spec_template_volume_list

type SpecTemplateVolumeMap

type SpecTemplateVolumeMap map[string]*SpecTemplateVolume

swagger:ignore SpecTemplateVolumeMap is a map of spec template volumes swagger:model types_spec_template_volume_map

type SpecTemplateVolumeMounts

type SpecTemplateVolumeMounts struct {
	// Template volume mounts name
	Name string `json:"name"`
}

swagger:ignore swagger:model types_spec_template_volume_mounts

type SpecTrigger

type SpecTrigger struct {
}

swagger:model types_spec_trigger

type SpecTriggers

type SpecTriggers []SpecTrigger

SpecTriggers is a list of spec triggers swagger:model types_spec_trigger_list

type SpecVolumeCapacity

type SpecVolumeCapacity struct {
	// Limit resources
	Storage int64 `json:"storage"`
}

swagger:model types_spec_volume_resources

type SpecVolumeResource

type SpecVolumeResource struct {
	// Size resource option
	Size int64 `json:"size"`
}

swagger:model types_spec_volume_resource

type Subnet

type Subnet struct {
	Runtime
	Meta   SubnetMeta   `json:"meta"`
	Status SubnetStatus `json:"status"`
	Spec   SubnetSpec   `json:"spec"`
}
func (s Subnet) SelfLink() string

type SubnetEvent

type SubnetEvent struct {
	Data *Subnet
	// contains filtered or unexported fields
}

func (*SubnetEvent) IsActionCreate

func (e *SubnetEvent) IsActionCreate() bool

func (*SubnetEvent) IsActionError

func (e *SubnetEvent) IsActionError() bool

func (*SubnetEvent) IsActionRemove

func (e *SubnetEvent) IsActionRemove() bool

func (*SubnetEvent) IsActionUpdate

func (e *SubnetEvent) IsActionUpdate() bool

type SubnetManifest

type SubnetManifest struct {
	Runtime
	SubnetSpec
}

type SubnetManifestEvent

type SubnetManifestEvent struct {
	Data *SubnetManifest
	// contains filtered or unexported fields
}

func (*SubnetManifestEvent) IsActionCreate

func (e *SubnetManifestEvent) IsActionCreate() bool

func (*SubnetManifestEvent) IsActionError

func (e *SubnetManifestEvent) IsActionError() bool

func (*SubnetManifestEvent) IsActionRemove

func (e *SubnetManifestEvent) IsActionRemove() bool

func (*SubnetManifestEvent) IsActionUpdate

func (e *SubnetManifestEvent) IsActionUpdate() bool

type SubnetManifestList

type SubnetManifestList struct {
	Runtime
	Items []*SubnetManifest
}

func NewSubnetManifestList

func NewSubnetManifestList() *SubnetManifestList

type SubnetManifestMap

type SubnetManifestMap struct {
	Runtime
	Items map[string]*SubnetManifest
}

func NewSubnetManifestMap

func NewSubnetManifestMap() *SubnetManifestMap

type SubnetMeta

type SubnetMeta struct {
	Meta
	Node string `json:"node"`
}

type SubnetSpec

type SubnetSpec struct {
	// Subnet state
	State string `json:"state"`
	// Node network type
	Type string `json:"type"`
	// Node Subnet subnet info
	CIDR string `json:"cidr"`
	// Node Subnet interface
	IFace NetworkInterface `json:"iface"`
	// Node Public IP
	Addr string `json:"addr"`
	// Node Internal IP
	IP string `json:"ip"`
}

swagger:model subnet_spec

type SubnetStatus

type SubnetStatus struct {
	State string `json:"state"`
}

type Volume

type Volume struct {
	Runtime
	// Volume meta
	Meta VolumeMeta `json:"meta" yaml:"meta"`
	// Volume spec
	Spec VolumeSpec `json:"spec" yaml:"spec"`
	// Volume status
	Status VolumeStatus `json:"status" yaml:"status"`
}

swagger:ignore swagger:model types_volume

func (v *Volume) CreateSelfLink(namespace, name string) string
func (v *Volume) SelfLink() string

type VolumeClaim

type VolumeClaim struct {
	// Pod name
	Name string `json:"name" yaml:"name"`
	// Pod volume name
	Volume string `json:"volume" yaml:"volume"`
	// Pod volume Path
	Path string `json:"path" yaml:"path"`
}

PodContainer is a container of the pod swagger:model types_pod_container

type VolumeCreateOptions

type VolumeCreateOptions struct {
}

swagger:ignore swagger:model types_volume_create

type VolumeEvent

type VolumeEvent struct {
	Data *Volume
	// contains filtered or unexported fields
}

func (*VolumeEvent) IsActionCreate

func (e *VolumeEvent) IsActionCreate() bool

func (*VolumeEvent) IsActionError

func (e *VolumeEvent) IsActionError() bool

func (*VolumeEvent) IsActionRemove

func (e *VolumeEvent) IsActionRemove() bool

func (*VolumeEvent) IsActionUpdate

func (e *VolumeEvent) IsActionUpdate() bool

type VolumeList

type VolumeList struct {
	Runtime
	Items []*Volume
}

swagger:ignore swagger:model types_volume_list

func NewVolumeList

func NewVolumeList() *VolumeList

type VolumeManifest

type VolumeManifest VolumeSpec

type VolumeManifestEvent

type VolumeManifestEvent struct {
	Node string
	Data *VolumeManifest
	// contains filtered or unexported fields
}

func (*VolumeManifestEvent) IsActionCreate

func (e *VolumeManifestEvent) IsActionCreate() bool

func (*VolumeManifestEvent) IsActionError

func (e *VolumeManifestEvent) IsActionError() bool

func (*VolumeManifestEvent) IsActionRemove

func (e *VolumeManifestEvent) IsActionRemove() bool

func (*VolumeManifestEvent) IsActionUpdate

func (e *VolumeManifestEvent) IsActionUpdate() bool

type VolumeManifestList

type VolumeManifestList struct {
	Runtime
	Items []*VolumeManifest
}

func NewVolumeManifestList

func NewVolumeManifestList() *VolumeManifestList

type VolumeManifestMap

type VolumeManifestMap struct {
	Runtime
	Items map[string]*VolumeManifest
}

func NewVolumeManifestMap

func NewVolumeManifestMap() *VolumeManifestMap

type VolumeMap

type VolumeMap struct {
	Runtime
	Items map[string]*Volume
}

swagger:ignore swagger:model types_volume_map

func NewVolumeMap

func NewVolumeMap() *VolumeMap

type VolumeMeta

type VolumeMeta struct {
	Meta
	Node      string `json:"node"`
	Namespace string `json:"namespace"`
}

swagger:ignore swagger:model types_volume_meta

type VolumeSpec

type VolumeSpec struct {
	Type       string             `json:"type"`
	Selector   SpecSelector       `json:"selector"`
	Capacity   SpecVolumeCapacity `json:"capacity"`
	State      VolumeSpecState    `json:"state"`
	HostPath   string             `json:"host_path"`
	AccessMode string             `json:"access_mode"`

	Updated time.Time `json:"updated"`
}

swagger:model types_volume_spec

type VolumeSpecState

type VolumeSpecState struct {
	Destroy bool `json:"destroy"`
}

swagger:model types_volume_spec_state

type VolumeState

type VolumeState struct {
	Type string `json:"type" yaml:"type"`
	// Volume root path
	Path string `json:"path" yaml:"path"`
	// Volume state ready
	Ready bool `json:"ready" yaml:"ready"`
}

swagger:ignore swagger:model types_volume_status

type VolumeStatus

type VolumeStatus struct {
	// volume state
	State string `json:"state" yaml:"state"`
	// volume status
	Status VolumeState `json:"status" yaml:"status"`
	// volume status message
	Message string `json:"message" yaml:"message"`
}

func NewVolumeStatus

func NewVolumeStatus() *VolumeStatus

func (*VolumeStatus) SetDestroyed

func (vs *VolumeStatus) SetDestroyed()

func (*VolumeStatus) SetError

func (vs *VolumeStatus) SetError(err error)

func (*VolumeStatus) SetReady

func (vs *VolumeStatus) SetReady()

type VolumeUpdateOptions

type VolumeUpdateOptions struct {
}

swagger:ignore swagger:model types_volume_update

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL