Documentation
¶
Index ¶
- Constants
- Variables
- func SubnetGetNameFromCIDR(CIDR string) string
- func SubnetSpecEqual(n *SubnetSpec, nt *SubnetSpec) bool
- type AuthConfig
- type Cluster
- type ClusterCreateOptions
- type ClusterEvent
- type ClusterList
- type ClusterMap
- type ClusterResources
- type ClusterSpec
- type ClusterStatus
- type ClusterStatusNodes
- type Config
- type ConfigEvent
- type ConfigFile
- type ConfigList
- type ConfigManifest
- type ConfigMap
- type ConfigMeta
- type ConfigRemoveOptions
- type ConfigSpec
- type ConfigText
- type Container
- type ContainerDNSSpec
- type ContainerLinkSpec
- type ContainerManifest
- type ContainerNetworkSpec
- type ContainerPortSpec
- type ContainerQuotaSpec
- type ContainerRestartPolicySpec
- type ContainerSpec
- func (cs *ContainerSpec) CommandFromString(command string)
- func (cs *ContainerSpec) CommandToString() string
- func (cs *ContainerSpec) DNSOptionsFromString(options string)
- func (cs *ContainerSpec) DNSOptionsToString() string
- func (cs *ContainerSpec) DNSSearchFromString(search string)
- func (cs *ContainerSpec) DNSSearchToString() string
- func (cs *ContainerSpec) DNSServerFromString(server string)
- func (cs *ContainerSpec) DNSServerToString() string
- func (cs *ContainerSpec) ENVsFromString(envs string)
- func (cs *ContainerSpec) ENVsToString() string
- func (cs *ContainerSpec) EntrypointFromString(entrypoint string)
- func (cs *ContainerSpec) EntrypointToString() string
- func (cs *ContainerSpec) PortsFromString(ports string)
- func (cs *ContainerSpec) PortsToString() string
- func (cs *ContainerSpec) VolumesFromString(volumes string)
- func (cs *ContainerSpec) VolumesToString() string
- type ContainerSpecMeta
- type ContainerStatusInfo
- type ContainerStatusInfoPort
- type ContainerVolumeSpec
- type Deployment
- type DeploymentEvent
- type DeploymentList
- type DeploymentMap
- type DeploymentMeta
- type DeploymentOptions
- type DeploymentReplicas
- type DeploymentSpec
- type DeploymentStatus
- type DeploymentUpdateOptions
- type Discovery
- type DiscoveryEvent
- type DiscoveryInfo
- type DiscoveryList
- type DiscoveryManifest
- type DiscoveryManifestMeta
- type DiscoveryMap
- type DiscoveryMeta
- type DiscoverySpec
- type DiscoveryStatus
- type DiscoveryStatusEvent
- type Endpoint
- type EndpointCreateOptions
- type EndpointEvent
- type EndpointList
- type EndpointManifest
- type EndpointManifestEvent
- type EndpointManifestList
- type EndpointManifestMap
- type EndpointMap
- type EndpointMeta
- type EndpointSpec
- type EndpointSpecStrategy
- type EndpointState
- type EndpointStatus
- type EndpointUpdateOptions
- type EndpointUpstream
- type Event
- type Image
- type ImageContainer
- type ImageManifest
- type ImageMeta
- type ImageSpec
- type ImageStatus
- type Ingress
- type IngressEvent
- type IngressInfo
- type IngressList
- type IngressManifest
- type IngressManifestMeta
- type IngressMap
- type IngressMeta
- type IngressSpec
- type IngressStatus
- type IngressStatusEvent
- type Meta
- type MetaCreateOptions
- type MetaUpdateOptions
- type Namespace
- type NamespaceCreateOptions
- type NamespaceDomain
- type NamespaceEnv
- type NamespaceEnvs
- type NamespaceEvent
- type NamespaceList
- type NamespaceMap
- type NamespaceMeta
- type NamespaceRemoveOptions
- type NamespaceResourcesOptions
- type NamespaceSpec
- type NamespaceStatus
- type NamespaceStatusResources
- type NamespaceUpdateOptions
- type Network
- type NetworkEvent
- type NetworkInterface
- type NetworkSettings
- type NetworkSpec
- type NetworkState
- type NetworkStatus
- type Node
- type NodeCreateMetaOptions
- type NodeCreateOptions
- type NodeEvent
- type NodeInfo
- type NodeList
- type NodeManifest
- type NodeManifestMeta
- type NodeMap
- type NodeMeta
- type NodeMode
- type NodeResources
- type NodeRole
- type NodeRoleRouter
- type NodeSSL
- type NodeSecurity
- type NodeSpec
- type NodeStatus
- type NodeStatusEvent
- type NodeStatusInterfaceState
- type NodeStatusState
- type NodeTask
- type NodeUpdateInfoOptions
- type NodeUpdateMetaOptions
- type Notification
- type NotificationList
- type NotificationMap
- type NotifyChannel
- type NotifyGroup
- type Pod
- type PodContainer
- type PodContainerImage
- type PodContainerState
- type PodContainerStateCreated
- type PodContainerStateError
- type PodContainerStateExit
- type PodContainerStateRestarted
- type PodContainerStateStarted
- type PodContainerStateStopped
- type PodEvent
- type PodList
- type PodManifest
- type PodManifestEvent
- type PodManifestList
- type PodManifestMap
- type PodMap
- type PodMeta
- type PodNetwork
- type PodSpec
- type PodStatus
- func (s *PodStatus) SetCreated()
- func (s *PodStatus) SetDestroy()
- func (s *PodStatus) SetDestroyed()
- func (s *PodStatus) SetError(err error)
- func (s *PodStatus) SetInitialized()
- func (s *PodStatus) SetProvision()
- func (s *PodStatus) SetPull()
- func (s *PodStatus) SetRunning()
- func (s *PodStatus) SetStarting()
- func (s *PodStatus) SetStopped()
- type PodStep
- type PodSteps
- type Port
- type Process
- type ProcessMeta
- type ProcessStatus
- type ResolverManifest
- type ResourceRequest
- type ResourceRequestItem
- type ResourceRequestItemOption
- type Route
- type RouteEvent
- type RouteList
- type RouteManifest
- type RouteManifestEvent
- type RouteManifestList
- type RouteManifestMap
- type RouteMap
- type RouteMeta
- type RouteRule
- type RouteSelector
- type RouteSpec
- type RouteStatus
- type Runtime
- type RuntimeSystem
- type Secret
- func (s *Secret) CreateSelfLink(namespace, name string) string
- func (s *Secret) DecodeRegistry()
- func (s *Secret) DecodeSecretAuthData() (*SecretAuthData, error)
- func (s *Secret) DecodeSecretTextData(key string) (string, error)
- func (s *Secret) EncodeSecretAuthData(d SecretAuthData)
- func (s *Secret) GetHash() string
- func (s *Secret) SelfLink() string
- type SecretAuthData
- type SecretCreateOptions
- type SecretEvent
- type SecretFile
- type SecretList
- type SecretManifest
- type SecretManifestEvent
- type SecretManifestList
- type SecretManifestMap
- type SecretMap
- type SecretMeta
- type SecretRemoveOptions
- type SecretSpec
- type SecretText
- type SecretUpdateOptions
- type Service
- type ServiceEndpoint
- type ServiceEnvFromOption
- type ServiceEnvOption
- type ServiceEvent
- type ServiceImageSpec
- type ServiceList
- type ServiceManifest
- type ServiceMap
- type ServiceMeta
- type ServiceOptionsSpec
- type ServiceRemoveOptions
- type ServiceReplicas
- type ServiceSpec
- type ServiceSpecStrategy
- type ServiceSpecStrategyResources
- type ServiceSpecStrategyRollingOptions
- type ServiceStatus
- type ServiceStatusNetwork
- type SpecBuildImage
- type SpecNetwork
- type SpecSelector
- type SpecState
- type SpecStrategy
- type SpecStrategyResources
- type SpecStrategyRollingOptions
- type SpecTemplate
- type SpecTemplateConfigVolume
- type SpecTemplateConfigVolumeBind
- type SpecTemplateContainer
- type SpecTemplateContainerDNS
- type SpecTemplateContainerEnv
- type SpecTemplateContainerEnvConfig
- type SpecTemplateContainerEnvSecret
- type SpecTemplateContainerEnvs
- type SpecTemplateContainerExec
- type SpecTemplateContainerImage
- type SpecTemplateContainerLink
- type SpecTemplateContainerNetwork
- type SpecTemplateContainerPort
- type SpecTemplateContainerPorts
- type SpecTemplateContainerProbe
- type SpecTemplateContainerProbes
- type SpecTemplateContainerResource
- type SpecTemplateContainerResources
- type SpecTemplateContainerSecurity
- type SpecTemplateContainerSecurityLinuxOptions
- type SpecTemplateContainerVolume
- type SpecTemplateContainerVolumes
- type SpecTemplateContainers
- type SpecTemplateRestartPolicy
- type SpecTemplateSecretVolume
- type SpecTemplateSecretVolumeBind
- type SpecTemplateVolume
- type SpecTemplateVolumeClaim
- type SpecTemplateVolumeList
- type SpecTemplateVolumeMap
- type SpecTemplateVolumeMounts
- type SpecTrigger
- type SpecTriggers
- type SpecVolumeCapacity
- type SpecVolumeResource
- type Subnet
- type SubnetEvent
- type SubnetManifest
- type SubnetManifestEvent
- type SubnetManifestList
- type SubnetManifestMap
- type SubnetMeta
- type SubnetSpec
- type SubnetStatus
- type Volume
- type VolumeClaim
- type VolumeCreateOptions
- type VolumeEvent
- type VolumeList
- type VolumeManifest
- type VolumeManifestEvent
- type VolumeManifestList
- type VolumeManifestMap
- type VolumeMap
- type VolumeMeta
- type VolumeSpec
- type VolumeSpecState
- type VolumeState
- type VolumeStatus
- type VolumeUpdateOptions
Constants ¶
const ( ContainerTypeLBC = "LBC" ContainerTypeLBR = "LBR" )
const ( // EndpointSpecRouteStrategyRR - round robin balancing strategy type EndpointSpecRouteStrategyRR = "rr" // EndpointSpecBindStrategyDefault - default scheduling endpoint across all nodes EndpointSpecBindStrategyDefault = "default" )
const ( EventActionCreate = "create" EventActionUpdate = "update" EventActionDelete = "delete" EventActionError = "error" )
const ( KindSecretOpaque = "opaque" KindSecretAuth = "auth" SecretUsernameKey = "username" SecretPasswordKey = "password" )
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" )
const ContainerRolePrimary = "primary"
const ContainerRoleSlave = "slave"
const (
DEFAULT_NAMESPACE string = "default"
)
const EmptyString = ""
const EmptyStringSlice = "[]"
const KindAPIServer = "api"
const (
KindConfigText = "text"
)
const KindController = "controller"
const KindDiscovery = "discovery"
const KindNode = "node"
const (
KindVolumeHostDir = "dir"
)
const NetworkTypeVxLAN = "vxlan"
const StateCancel = "cancel"
const StateCreated = "created"
const StateDegradation = "degradation"
const StateDestroy = "destroy"
const StateDestroyed = "destroyed"
const StateError = "error"
const StateExited = "exited"
const StateNotReady = "not ready"
const StateProvision = "provision"
const StateReady = "ready"
const StateStarted = "started"
const StateUpdated = "updated"
const StateWaiting = "waiting"
const StateWarning = "warning"
const StatusBuild = "build"
const StatusInitialized = "initialized"
const StatusPull = "pull"
const StatusRunning = "running"
const StatusStarting = "starting"
const StatusStopped = "stopped"
const StepInitialized = "initialized"
const StepPull = "pull"
const StepReady = "ready"
Variables ¶
var (
SecretAccessToken = ""
)
Functions ¶
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
}
type ClusterResources ¶
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 Config ¶
type Config struct {
Runtime
Meta ConfigMeta `json:"meta" yaml:"meta"`
Spec ConfigSpec `json:"spec" yaml:"spec"`
}
swagger:ignore swagger:model types_config
type ConfigEvent ¶
type ConfigEvent struct {
Data *Config
// contains filtered or unexported fields
}
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 ¶
swagger:ignore
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 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 ContainerLinkSpec ¶
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 ContainerPortSpec ¶
type ContainerQuotaSpec ¶
type ContainerRestartPolicySpec ¶
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 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 ContainerVolumeSpec ¶
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 (*Deployment) CreateSelfLink ¶
func (d *Deployment) CreateSelfLink(namespace, service, name string) string
func (*Deployment) SelfLink ¶
func (d *Deployment) SelfLink() string
func (*Deployment) ServiceLink ¶
func (d *Deployment) ServiceLink() string
type DeploymentEvent ¶
type DeploymentEvent struct {
Data *Deployment
// contains filtered or unexported fields
}
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 DeploymentReplicas ¶
type DeploymentSpec ¶
type DeploymentSpec struct {
Replicas int `json:"replicas"`
State SpecState `json:"state"`
Selector SpecSelector `json:"selector"`
Template SpecTemplate `json:"template"`
}
type DeploymentStatus ¶
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 Discovery ¶
type Discovery struct {
Runtime
Meta DiscoveryMeta `json:"meta"`
Status DiscoveryStatus `json:"status"`
Spec DiscoverySpec `json:"spec"`
}
swagger:ignore
type DiscoveryEvent ¶
type DiscoveryEvent struct {
Data *Discovery
// contains filtered or unexported fields
}
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 ¶
func NewDiscoveryList ¶
func NewDiscoveryList() *DiscoveryList
type DiscoveryManifest ¶
type DiscoveryManifest struct {
Meta DiscoveryManifestMeta `json:"meta"`
Network map[string]*SubnetManifest `json:"network"`
}
type DiscoveryMap ¶
func NewDiscoveryMap ¶
func NewDiscoveryMap() *DiscoveryMap
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
}
type Endpoint ¶
type Endpoint struct {
Runtime
Meta EndpointMeta `json:"meta"`
Status EndpointStatus `json:"status"`
Spec EndpointSpec `json:"spec"`
}
swagger:ignore Endpoint - service endpoint
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
}
type EndpointList ¶
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
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 ¶
func NewEndpointMap ¶
func NewEndpointMap() *EndpointMap
type EndpointMeta ¶
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 ¶
EndpointSpecStrategy describes route and bind swagger:model types_endpoint_spec_strategy
type EndpointState ¶
type EndpointState struct {
EndpointSpec
}
type EndpointStatus ¶
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 ¶
swagger:ignore EndpointUpstream describe endpoint backend data
type Event ¶
type Event struct {
Data interface{}
// contains filtered or unexported fields
}
type Image ¶
type Image struct {
Meta ImageMeta
Status ImageStatus
Spec ImageSpec
}
type ImageContainer ¶
type ImageContainer struct {
Ports []string
Envs []string
Exec SpecTemplateContainerExec
}
type ImageManifest ¶
type ImageMeta ¶
type ImageSpec ¶
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
type IngressEvent ¶
type IngressEvent struct {
Data *Ingress
// contains filtered or unexported fields
}
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 ¶
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 IngressMap ¶
func NewIngressMap ¶
func NewIngressMap() *IngressMap
type IngressSpec ¶
type IngressSpec struct {
}
type IngressStatus ¶
swagger:model types_ingress_status
type IngressStatusEvent ¶
type IngressStatusEvent struct {
Data *IngressStatus
// contains filtered or unexported fields
}
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
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
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 NamespaceEnv ¶
swagger:ignore
type NamespaceEvent ¶
type NamespaceEvent struct {
Data *Namespace
// contains filtered or unexported fields
}
type NamespaceList ¶
swagger:ignore
func NewNamespaceList ¶
func NewNamespaceList() *NamespaceList
func (*NamespaceList) ToJson ¶
func (n *NamespaceList) ToJson() ([]byte, error)
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
}
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 Node ¶
type Node struct {
Runtime
Meta NodeMeta `json:"meta"`
Status NodeStatus `json:"status"`
Spec NodeSpec `json:"spec"`
}
swagger:ignore swagger:model types_node
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 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 ¶
swagger:ignore swagger:model types_node_list
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 NodeMap ¶
swagger:ignore swagger:model types_node_map
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 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 ¶
swagger:ignore swagger:model types_node_role_router
type NodeSSL ¶
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
}
type NodeStatusInterfaceState ¶
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 NotificationList ¶
type NotificationList []*Notification
type NotificationMap ¶
type NotificationMap map[string]*Notification
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 (*Pod) CreateSelfLink ¶
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 ¶
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 PodList ¶
type PodManifestEvent ¶
type PodManifestEvent struct {
Node string
Data *PodManifest
// contains filtered or unexported fields
}
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 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
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 ¶
PodSteps is a map of pod steps swagger:model types_pod_step_map
type 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 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
type RouteList ¶
swagger:ignore
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
}
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 ¶
swagger:ignore
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 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 Secret ¶
type Secret struct {
Runtime
Meta SecretMeta `json:"meta" yaml:"meta"`
Spec SecretSpec `json:"spec" yaml:"yaml"`
}
swagger:ignore swagger:model types_secret
func (*Secret) DecodeSecretAuthData ¶
func (s *Secret) DecodeSecretAuthData() (*SecretAuthData, error)
func (*Secret) DecodeSecretTextData ¶
func (*Secret) EncodeSecretAuthData ¶
func (s *Secret) EncodeSecretAuthData(d SecretAuthData)
type SecretAuthData ¶
type SecretCreateOptions ¶
swagger:ignore
type SecretEvent ¶
type SecretEvent struct {
Data *Secret
// contains filtered or unexported fields
}
type SecretManifest ¶
type SecretManifestEvent ¶
type SecretManifestEvent struct {
Data *SecretManifest
// contains filtered or unexported fields
}
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 ¶
swagger:ignore
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 SecretUpdateOptions ¶
swagger:ignore
type Service ¶
type Service struct {
Runtime
Meta ServiceMeta `json:"meta"`
Status ServiceStatus `json:"status"`
Spec ServiceSpec `json:"spec"`
}
type ServiceEndpoint ¶
type ServiceEnvFromOption ¶
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
}
type ServiceImageSpec ¶
type ServiceList ¶
func NewServiceList ¶
func NewServiceList() *ServiceList
type ServiceManifest ¶
type ServiceManifest struct {
Meta ServiceMeta `json:"meta"`
}
type ServiceMap ¶
func NewServiceMap ¶
func NewServiceMap() *ServiceMap
type ServiceMeta ¶
type ServiceOptionsSpec ¶
type ServiceReplicas ¶
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 ServiceStatus ¶
type ServiceStatus struct {
State string `json:"state"`
Message string `json:"message"`
Network ServiceStatusNetwork `json:"network"`
}
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 ¶
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"`
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 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 SpecTemplateContainerEnvSecret ¶
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 ¶
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 ¶
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 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"`
}
type SubnetEvent ¶
type SubnetEvent struct {
Data *Subnet
// contains filtered or unexported fields
}
type SubnetManifest ¶
type SubnetManifest struct {
Runtime
SubnetSpec
}
type SubnetManifestEvent ¶
type SubnetManifestEvent struct {
Data *SubnetManifest
// contains filtered or unexported fields
}
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 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 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
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
}
type VolumeList ¶
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
}
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 ¶
swagger:ignore swagger:model types_volume_map
type VolumeMeta ¶
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
Source Files
¶
- cluster.go
- common.go
- config.go
- container.go
- deployment.go
- discovery.go
- endpoint.go
- event.go
- image.go
- ingress.go
- manifest.go
- namespace.go
- network.go
- node.go
- notification.go
- pod.go
- proxy.go
- route.go
- secret.go
- service.go
- spec.go
- state.go
- storage.go
- system.go
- types.go
- volume.go