2016-03-18 14:53:27 -04:00
|
|
|
package libcontainerd
|
|
|
|
|
2016-08-17 18:46:28 -04:00
|
|
|
import (
|
|
|
|
"github.com/Microsoft/hcsshim"
|
2016-09-27 13:26:59 -04:00
|
|
|
"github.com/opencontainers/runtime-spec/specs-go"
|
2016-08-17 18:46:28 -04:00
|
|
|
)
|
2016-03-18 14:53:27 -04:00
|
|
|
|
|
|
|
// Process contains information to start a specific application inside the container.
|
2016-09-27 13:26:59 -04:00
|
|
|
type Process specs.Process
|
2016-03-18 14:53:27 -04:00
|
|
|
|
2016-08-17 18:46:28 -04:00
|
|
|
// Summary contains a ProcessList item from HCS to support `top`
|
|
|
|
type Summary hcsshim.ProcessListItem
|
2016-03-20 18:58:23 -04:00
|
|
|
|
2016-04-01 20:02:38 -04:00
|
|
|
// StateInfo contains description about the new state container has entered.
|
|
|
|
type StateInfo struct {
|
|
|
|
CommonStateInfo
|
|
|
|
|
|
|
|
// Platform specific StateInfo
|
2016-04-13 16:34:07 -04:00
|
|
|
UpdatePending bool // Indicates that there are some update operations pending that should be completed by a servicing container.
|
2016-04-01 20:02:38 -04:00
|
|
|
}
|
|
|
|
|
2016-12-14 02:50:25 -05:00
|
|
|
// Stats contains statistics from HCS
|
2016-09-07 19:08:51 -04:00
|
|
|
type Stats hcsshim.Statistics
|
2016-03-18 14:53:27 -04:00
|
|
|
|
|
|
|
// Resources defines updatable container resource values.
|
|
|
|
type Resources struct{}
|
2016-04-13 16:34:07 -04:00
|
|
|
|
2016-09-17 21:17:51 -04:00
|
|
|
// ServicingOption is a CreateOption with a no-op application that signifies
|
2016-08-17 19:10:01 -04:00
|
|
|
// the container needs to be used for a Windows servicing operation.
|
2016-04-13 16:34:07 -04:00
|
|
|
type ServicingOption struct {
|
|
|
|
IsServicing bool
|
|
|
|
}
|
2016-05-12 10:52:00 -04:00
|
|
|
|
2016-09-17 21:17:51 -04:00
|
|
|
// FlushOption is a CreateOption that signifies if the container should be
|
2016-09-16 13:41:47 -04:00
|
|
|
// started with flushes ignored until boot has completed. This is an optimisation
|
|
|
|
// for first boot of a container.
|
|
|
|
type FlushOption struct {
|
|
|
|
IgnoreFlushesDuringBoot bool
|
|
|
|
}
|
|
|
|
|
2016-09-19 17:47:48 -04:00
|
|
|
// HyperVIsolationOption is a CreateOption that indicates whether the runtime
|
2017-05-24 16:39:59 -04:00
|
|
|
// should start the container as a Hyper-V container.
|
2016-09-19 17:47:48 -04:00
|
|
|
type HyperVIsolationOption struct {
|
2017-05-24 16:39:59 -04:00
|
|
|
IsHyperV bool
|
2016-09-19 17:47:48 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// LayerOption is a CreateOption that indicates to the runtime the layer folder
|
|
|
|
// and layer paths for a container.
|
|
|
|
type LayerOption struct {
|
2016-12-14 02:50:25 -05:00
|
|
|
// LayerFolderPath is the path to the current layer folder. Empty for Hyper-V containers.
|
2016-09-19 17:47:48 -04:00
|
|
|
LayerFolderPath string `json:",omitempty"`
|
|
|
|
// Layer paths of the parent layers
|
|
|
|
LayerPaths []string
|
|
|
|
}
|
|
|
|
|
2016-09-17 21:17:51 -04:00
|
|
|
// NetworkEndpointsOption is a CreateOption that provides the runtime list
|
|
|
|
// of network endpoints to which a container should be attached during its creation.
|
|
|
|
type NetworkEndpointsOption struct {
|
2016-09-12 20:17:09 -04:00
|
|
|
Endpoints []string
|
|
|
|
AllowUnqualifiedDNSQuery bool
|
2017-01-13 00:09:57 -05:00
|
|
|
DNSSearchList []string
|
2017-02-28 23:03:43 -05:00
|
|
|
NetworkSharedContainerID string
|
2016-09-17 21:17:51 -04:00
|
|
|
}
|
|
|
|
|
2016-06-07 15:15:50 -04:00
|
|
|
// CredentialsOption is a CreateOption that indicates the credentials from
|
|
|
|
// a credential spec to be used to the runtime
|
|
|
|
type CredentialsOption struct {
|
|
|
|
Credentials string
|
|
|
|
}
|
|
|
|
|
2016-05-12 10:52:00 -04:00
|
|
|
// Checkpoint holds the details of a checkpoint (not supported in windows)
|
|
|
|
type Checkpoint struct {
|
|
|
|
Name string
|
|
|
|
}
|
|
|
|
|
|
|
|
// Checkpoints contains the details of a checkpoint
|
|
|
|
type Checkpoints struct {
|
|
|
|
Checkpoints []*Checkpoint
|
|
|
|
}
|