| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- package scheme
- const CONTAINER_KIND_ONESHOT = "oneshot"
- const CONTAINER_KIND_CONTINIOUS = "continious"
- type Image struct {
- Tag string `json:"tag" yaml:"tag"`
- Version string `json:"version" yaml:"version"`
- Pull bool `json:"pull" yaml:"pull"`
- }
- type Variable struct {
- Key string `json:"key" yaml:"key"`
- Value string `json:"value" yaml:"value"`
- }
- type Network struct {
- Name string `json:"name" yaml:"name"`
- CIDR string `json:"cidr" yaml:"cidr"`
- Gateway string `json:"gateway" yaml:"gateway"`
- }
- type ContainerPermissions struct {
- Privileged bool `json:"privileged" yaml:"privileged"`
- Capabilities []string `json:"capabilities" yaml:"capabilities"`
- }
- type ContainerNetwork struct {
- IP string `json:"ip" yaml:"ip"`
- }
- type ContainerResources struct {
- CPU int64 `json:"cpu" yaml:"cpu"`
- Memory int64 `json:"memory" yaml:"memory"`
- // TODO: disk iops, network iops
- }
- type Container struct {
- ID string `json:"id" yaml:"id"`
- Image Image `json:"image" yaml:"image"`
- Command string `json:"command" yaml:"command"`
- Variables []Variable `json:"environment" yaml:"environment"`
- Binds []string `json:"binds" yaml:"binds"`
- Permissions ContainerPermissions `json:"permissions" yaml:"permissions"`
- Network ContainerNetwork `json:"network" yaml:"network"`
- Resources ContainerResources `json:"resources" yaml:"resources"`
- Kind string `json:"kind" yaml:"kind"`
- KindOneshot ContainerOneshot `json:"kind_oneshot" yaml:"kind_oneshot"`
- KindContinious ContainerContinious `json:"kind_continious" yaml:"kind_continious"`
- }
|