Documentation
¶
Index ¶
- func InterfaceSlice(slice interface{}) ([]interface{}, error)
- func RandStr(strSize int, randType string) string
- type KContainer
- type KEmptyDir
- type KEnv
- type KGCEPersistentDisk
- type KHostDir
- type KMeta
- type KPod
- type KPort
- type KSpec
- type KVolume
- type KVolumeReference
- type KVolumeSource
- type PodLogConfig
- type PortmappingWhiteList
- type UserContainer
- type UserContainerPort
- type UserEnvironmentVar
- type UserFile
- type UserFileReference
- type UserInterface
- type UserPod
- type UserResource
- type UserService
- type UserServiceBackend
- type UserUser
- type UserVolume
- type UserVolumeOption
- type UserVolumeReference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InterfaceSlice ¶
func InterfaceSlice(slice interface{}) ([]interface{}, error)
Types ¶
type KContainer ¶
type KContainer struct {
Name string `json:"name"`
Image string `json:"image"`
Command []string `json:"command"`
Args []string `json:"args"`
WorkingDir string `json:"workingDir"`
Resources map[string]interface{} `json:"resources"`
CPU int
Memory int64
Volumes []*KVolumeReference `json:"volumeMounts"`
Ports []*KPort `json:"ports"`
Env []*KEnv `json:"env"`
}
type KGCEPersistentDisk ¶
type KGCEPersistentDisk struct{}
type KPod ¶
type KSpec ¶
type KSpec struct {
Containers []*KContainer `json:"containers"`
Volumes []*KVolume `json:"volumes"`
RestartPolicy string `json:"restartPolicy"`
DNSPolicy []string
}
type KVolume ¶
type KVolume struct {
Name string `json:"name"`
Source *KVolumeSource `json:"source"`
}
type KVolumeReference ¶
type KVolumeSource ¶
type KVolumeSource struct {
EmptyDir *KEmptyDir `json:"emptyDir"`
HostDir *KHostDir `json:"hostDir"`
GCEPersistentDisk *KGCEPersistentDisk
}
type PodLogConfig ¶
type PortmappingWhiteList ¶ added in v0.6.2
type UserContainer ¶
type UserContainer struct {
Name string `json:"name"`
Image string `json:"image"`
User UserUser `json:"user,omitempty"`
Command []string `json:"command"`
Workdir string `json:"workdir"`
Entrypoint []string `json:"entrypoint"`
Tty bool `json:"tty,omitempty"`
Sysctl map[string]string `json:"sysctl,omitempty"`
Labels map[string]string `json:"labels"`
Ports []UserContainerPort `json:"ports"`
Envs []UserEnvironmentVar `json:"envs"`
Volumes []UserVolumeReference `json:"volumes"`
Files []UserFileReference `json:"files"`
RestartPolicy string `json:"restartPolicy"`
}
func ConvertOCF2UserContainer ¶
func ConvertOCF2UserContainer(s *specs.Spec) *UserContainer
type UserContainerPort ¶
type UserEnvironmentVar ¶
type UserFileReference ¶
type UserInterface ¶
type UserPod ¶
type UserPod struct {
Name string `json:"id"`
Hostname string `json:"hostname"`
Containers []UserContainer `json:"containers"`
Resource UserResource `json:"resource"`
Files []UserFile `json:"files"`
Volumes []UserVolume `json:"volumes"`
Interfaces []UserInterface `json:"interfaces,omitempty"`
Labels map[string]string `json:"labels"`
Services []UserService `json:"services,omitempty"`
LogConfig PodLogConfig `json:"log"`
Dns []string `json:"dns,omitempty"`
PortmappingWhiteLists *PortmappingWhiteList `json:"portmappingWhiteLists,omitempty"`
Tty bool `json:"tty"`
Type string `json:"type"`
RestartPolicy string
}
func ConvertOCF2PureUserPod ¶
func ConvertOCF2PureUserPod(s *specs.Spec) *UserPod
func ProcessPodBytes ¶
func ProcessPodFile ¶
type UserResource ¶
type UserService ¶
type UserService struct {
ServiceIP string `json:"serviceip"`
ServicePort int `json:"serviceport"`
Protocol string `json:"protocol"`
Hosts []UserServiceBackend `json:"hosts"`
}
type UserServiceBackend ¶
type UserUser ¶
type UserUser struct {
Name string `json:"name"`
Group string `json:"group"`
AdditionalGroups []string `json:"additionalGroups,omitempty"`
}
Pod Data Structure
type UserVolume ¶
type UserVolume struct {
Name string `json:"name"`
Source string `json:"source"`
Driver string `json:"driver"`
Option UserVolumeOption `json:"option,omitempty"`
}
type UserVolumeOption ¶
type UserVolumeReference ¶
Click to show internal directories.
Click to hide internal directories.