mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-02-23 15:34:28 +01:00
vendor: Update the agent vendoring based on pkg/types
Some agent types definition that were generic enough to be reused everywhere, have been split from the initial grpc package. This prevents from importing the entire protobuf package through the grpc one, and prevents binaries such as kata-netmon to stay in sync with the types definitions. Fixes #856 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
1093
vendor/github.com/kata-containers/agent/pkg/types/types.pb.go
generated
vendored
Normal file
1093
vendor/github.com/kata-containers/agent/pkg/types/types.pb.go
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
24
vendor/github.com/kata-containers/agent/protocols/client/client.go
generated
vendored
24
vendor/github.com/kata-containers/agent/protocols/client/client.go
generated
vendored
@@ -165,6 +165,26 @@ func parse(sock string) (string, *url.URL, error) {
|
||||
return grpcAddr, addr, nil
|
||||
}
|
||||
|
||||
// This function is meant to run in a go routine since it will send ping
|
||||
// commands every second. It behaves as a heartbeat to maintain a proper
|
||||
// communication state with the Yamux server in the agent.
|
||||
func heartBeat(session *yamux.Session) {
|
||||
if session == nil {
|
||||
return
|
||||
}
|
||||
|
||||
for {
|
||||
if session.IsClosed() {
|
||||
break
|
||||
}
|
||||
|
||||
session.Ping()
|
||||
|
||||
// 1 Hz heartbeat
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
func agentDialer(addr *url.URL, enableYamux bool) dialer {
|
||||
var d dialer
|
||||
switch addr.Scheme {
|
||||
@@ -196,11 +216,15 @@ func agentDialer(addr *url.URL, enableYamux bool) dialer {
|
||||
sessionConfig := yamux.DefaultConfig()
|
||||
// Disable keepAlive since we don't know how much time a container can be paused
|
||||
sessionConfig.EnableKeepAlive = false
|
||||
sessionConfig.ConnectionWriteTimeout = time.Second
|
||||
session, err = yamux.Client(conn, sessionConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Start the heartbeat in a separate go routine
|
||||
go heartBeat(session)
|
||||
|
||||
var stream net.Conn
|
||||
stream, err = session.Open()
|
||||
if err != nil {
|
||||
|
||||
1745
vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go
generated
vendored
1745
vendor/github.com/kata-containers/agent/protocols/grpc/agent.pb.go
generated
vendored
File diff suppressed because it is too large
Load Diff
30
vendor/github.com/kata-containers/agent/protocols/grpc/health.pb.go
generated
vendored
30
vendor/github.com/kata-containers/agent/protocols/grpc/health.pb.go
generated
vendored
@@ -108,7 +108,10 @@ func init() {
|
||||
}
|
||||
func (this *CheckRequest) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*CheckRequest)
|
||||
@@ -121,7 +124,10 @@ func (this *CheckRequest) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -132,7 +138,10 @@ func (this *CheckRequest) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *HealthCheckResponse) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*HealthCheckResponse)
|
||||
@@ -145,7 +154,10 @@ func (this *HealthCheckResponse) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -156,7 +168,10 @@ func (this *HealthCheckResponse) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *VersionCheckResponse) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*VersionCheckResponse)
|
||||
@@ -169,7 +184,10 @@ func (this *VersionCheckResponse) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
310
vendor/github.com/kata-containers/agent/protocols/grpc/oci.pb.go
generated
vendored
310
vendor/github.com/kata-containers/agent/protocols/grpc/oci.pb.go
generated
vendored
@@ -1499,7 +1499,10 @@ func init() {
|
||||
}
|
||||
func (this *Spec) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*Spec)
|
||||
@@ -1512,7 +1515,10 @@ func (this *Spec) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -1560,7 +1566,10 @@ func (this *Spec) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *Process) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*Process)
|
||||
@@ -1573,7 +1582,10 @@ func (this *Process) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -1632,7 +1644,10 @@ func (this *Process) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *Box) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*Box)
|
||||
@@ -1645,7 +1660,10 @@ func (this *Box) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -1659,7 +1677,10 @@ func (this *Box) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *User) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*User)
|
||||
@@ -1672,7 +1693,10 @@ func (this *User) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -1697,7 +1721,10 @@ func (this *User) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxCapabilities) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxCapabilities)
|
||||
@@ -1710,7 +1737,10 @@ func (this *LinuxCapabilities) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -1758,7 +1788,10 @@ func (this *LinuxCapabilities) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *POSIXRlimit) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*POSIXRlimit)
|
||||
@@ -1771,7 +1804,10 @@ func (this *POSIXRlimit) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -1788,7 +1824,10 @@ func (this *POSIXRlimit) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *Mount) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*Mount)
|
||||
@@ -1801,7 +1840,10 @@ func (this *Mount) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -1826,7 +1868,10 @@ func (this *Mount) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *Root) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*Root)
|
||||
@@ -1839,7 +1884,10 @@ func (this *Root) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -1853,7 +1901,10 @@ func (this *Root) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *Hooks) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*Hooks)
|
||||
@@ -1866,7 +1917,10 @@ func (this *Hooks) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -1898,7 +1952,10 @@ func (this *Hooks) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *Hook) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*Hook)
|
||||
@@ -1911,7 +1968,10 @@ func (this *Hook) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -1941,7 +2001,10 @@ func (this *Hook) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *Linux) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*Linux)
|
||||
@@ -1954,7 +2017,10 @@ func (this *Linux) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2036,7 +2102,10 @@ func (this *Linux) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *Windows) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*Windows)
|
||||
@@ -2049,7 +2118,10 @@ func (this *Windows) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2060,7 +2132,10 @@ func (this *Windows) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *Solaris) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*Solaris)
|
||||
@@ -2073,7 +2148,10 @@ func (this *Solaris) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2084,7 +2162,10 @@ func (this *Solaris) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxIDMapping) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxIDMapping)
|
||||
@@ -2097,7 +2178,10 @@ func (this *LinuxIDMapping) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2114,7 +2198,10 @@ func (this *LinuxIDMapping) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxNamespace) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxNamespace)
|
||||
@@ -2127,7 +2214,10 @@ func (this *LinuxNamespace) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2141,7 +2231,10 @@ func (this *LinuxNamespace) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxDevice) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxDevice)
|
||||
@@ -2154,7 +2247,10 @@ func (this *LinuxDevice) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2183,7 +2279,10 @@ func (this *LinuxDevice) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxResources) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxResources)
|
||||
@@ -2196,7 +2295,10 @@ func (this *LinuxResources) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2235,7 +2337,10 @@ func (this *LinuxResources) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxMemory) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxMemory)
|
||||
@@ -2248,7 +2353,10 @@ func (this *LinuxMemory) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2277,7 +2385,10 @@ func (this *LinuxMemory) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxCPU) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxCPU)
|
||||
@@ -2290,7 +2401,10 @@ func (this *LinuxCPU) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2319,7 +2433,10 @@ func (this *LinuxCPU) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxWeightDevice) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxWeightDevice)
|
||||
@@ -2332,7 +2449,10 @@ func (this *LinuxWeightDevice) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2352,7 +2472,10 @@ func (this *LinuxWeightDevice) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxThrottleDevice) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxThrottleDevice)
|
||||
@@ -2365,7 +2488,10 @@ func (this *LinuxThrottleDevice) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2382,7 +2508,10 @@ func (this *LinuxThrottleDevice) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxBlockIO) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxBlockIO)
|
||||
@@ -2395,7 +2524,10 @@ func (this *LinuxBlockIO) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2449,7 +2581,10 @@ func (this *LinuxBlockIO) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxPids) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxPids)
|
||||
@@ -2462,7 +2597,10 @@ func (this *LinuxPids) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2473,7 +2611,10 @@ func (this *LinuxPids) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxDeviceCgroup) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxDeviceCgroup)
|
||||
@@ -2486,7 +2627,10 @@ func (this *LinuxDeviceCgroup) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2509,7 +2653,10 @@ func (this *LinuxDeviceCgroup) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxNetwork) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxNetwork)
|
||||
@@ -2522,7 +2669,10 @@ func (this *LinuxNetwork) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2541,7 +2691,10 @@ func (this *LinuxNetwork) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxHugepageLimit) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxHugepageLimit)
|
||||
@@ -2554,7 +2707,10 @@ func (this *LinuxHugepageLimit) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2568,7 +2724,10 @@ func (this *LinuxHugepageLimit) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxInterfacePriority) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxInterfacePriority)
|
||||
@@ -2581,7 +2740,10 @@ func (this *LinuxInterfacePriority) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2595,7 +2757,10 @@ func (this *LinuxInterfacePriority) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxSeccomp) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxSeccomp)
|
||||
@@ -2608,7 +2773,10 @@ func (this *LinuxSeccomp) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2635,7 +2803,10 @@ func (this *LinuxSeccomp) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxSeccompArg) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxSeccompArg)
|
||||
@@ -2648,7 +2819,10 @@ func (this *LinuxSeccompArg) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2668,7 +2842,10 @@ func (this *LinuxSeccompArg) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxSyscall) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxSyscall)
|
||||
@@ -2681,7 +2858,10 @@ func (this *LinuxSyscall) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
@@ -2708,7 +2888,10 @@ func (this *LinuxSyscall) Equal(that interface{}) bool {
|
||||
}
|
||||
func (this *LinuxIntelRdt) Equal(that interface{}) bool {
|
||||
if that == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
that1, ok := that.(*LinuxIntelRdt)
|
||||
@@ -2721,7 +2904,10 @@ func (this *LinuxIntelRdt) Equal(that interface{}) bool {
|
||||
}
|
||||
}
|
||||
if that1 == nil {
|
||||
return this == nil
|
||||
if this == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
} else if this == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
80
vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
generated
vendored
80
vendor/github.com/opencontainers/runtime-spec/specs-go/config.go
generated
vendored
@@ -25,6 +25,8 @@ type Spec struct {
|
||||
Solaris *Solaris `json:"solaris,omitempty" platform:"solaris"`
|
||||
// Windows is platform-specific configuration for Windows based containers.
|
||||
Windows *Windows `json:"windows,omitempty" platform:"windows"`
|
||||
// VM specifies configuration for virtual-machine-based containers.
|
||||
VM *VM `json:"vm,omitempty" platform:"vm"`
|
||||
}
|
||||
|
||||
// Process contains information to start a specific application inside the container.
|
||||
@@ -158,8 +160,8 @@ type Linux struct {
|
||||
ReadonlyPaths []string `json:"readonlyPaths,omitempty"`
|
||||
// MountLabel specifies the selinux context for the mounts in the container.
|
||||
MountLabel string `json:"mountLabel,omitempty"`
|
||||
// IntelRdt contains Intel Resource Director Technology (RDT) information
|
||||
// for handling resource constraints (e.g., L3 cache) for the container
|
||||
// IntelRdt contains Intel Resource Director Technology (RDT) information for
|
||||
// handling resource constraints (e.g., L3 cache, memory bandwidth) for the container
|
||||
IntelRdt *LinuxIntelRdt `json:"intelRdt,omitempty"`
|
||||
}
|
||||
|
||||
@@ -194,10 +196,10 @@ const (
|
||||
|
||||
// LinuxIDMapping specifies UID/GID mappings
|
||||
type LinuxIDMapping struct {
|
||||
// HostID is the starting UID/GID on the host to be mapped to 'ContainerID'
|
||||
HostID uint32 `json:"hostID"`
|
||||
// ContainerID is the starting UID/GID in the container
|
||||
ContainerID uint32 `json:"containerID"`
|
||||
// HostID is the starting UID/GID on the host to be mapped to 'ContainerID'
|
||||
HostID uint32 `json:"hostID"`
|
||||
// Size is the number of IDs to be mapped
|
||||
Size uint32 `json:"size"`
|
||||
}
|
||||
@@ -320,6 +322,14 @@ type LinuxNetwork struct {
|
||||
Priorities []LinuxInterfacePriority `json:"priorities,omitempty"`
|
||||
}
|
||||
|
||||
// LinuxRdma for Linux cgroup 'rdma' resource management (Linux 4.11)
|
||||
type LinuxRdma struct {
|
||||
// Maximum number of HCA handles that can be opened. Default is "no limit".
|
||||
HcaHandles *uint32 `json:"hcaHandles,omitempty"`
|
||||
// Maximum number of HCA objects that can be created. Default is "no limit".
|
||||
HcaObjects *uint32 `json:"hcaObjects,omitempty"`
|
||||
}
|
||||
|
||||
// LinuxResources has container runtime resource constraints
|
||||
type LinuxResources struct {
|
||||
// Devices configures the device whitelist.
|
||||
@@ -336,6 +346,10 @@ type LinuxResources struct {
|
||||
HugepageLimits []LinuxHugepageLimit `json:"hugepageLimits,omitempty"`
|
||||
// Network restriction configuration
|
||||
Network *LinuxNetwork `json:"network,omitempty"`
|
||||
// Rdma resource restriction configuration.
|
||||
// Limits are a set of key value pairs that define RDMA resource limits,
|
||||
// where the key is device name and value is resource limits.
|
||||
Rdma map[string]LinuxRdma `json:"rdma,omitempty"`
|
||||
}
|
||||
|
||||
// LinuxDevice represents the mknod information for a Linux special device file
|
||||
@@ -419,6 +433,8 @@ type SolarisAnet struct {
|
||||
type Windows struct {
|
||||
// LayerFolders contains a list of absolute paths to directories containing image layers.
|
||||
LayerFolders []string `json:"layerFolders"`
|
||||
// Devices are the list of devices to be mapped into the container.
|
||||
Devices []WindowsDevice `json:"devices,omitempty"`
|
||||
// Resources contains information for handling resource constraints for the container.
|
||||
Resources *WindowsResources `json:"resources,omitempty"`
|
||||
// CredentialSpec contains a JSON object describing a group Managed Service Account (gMSA) specification.
|
||||
@@ -433,6 +449,14 @@ type Windows struct {
|
||||
Network *WindowsNetwork `json:"network,omitempty"`
|
||||
}
|
||||
|
||||
// WindowsDevice represents information about a host device to be mapped into the container.
|
||||
type WindowsDevice struct {
|
||||
// Device identifier: interface class GUID, etc.
|
||||
ID string `json:"id"`
|
||||
// Device identifier type: "class", etc.
|
||||
IDType string `json:"idType"`
|
||||
}
|
||||
|
||||
// WindowsResources has container runtime resource constraints for containers running on Windows.
|
||||
type WindowsResources struct {
|
||||
// Memory restriction configuration.
|
||||
@@ -479,6 +503,8 @@ type WindowsNetwork struct {
|
||||
DNSSearchList []string `json:"DNSSearchList,omitempty"`
|
||||
// Name (ID) of the container that we will share with the network stack.
|
||||
NetworkSharedContainerName string `json:"networkSharedContainerName,omitempty"`
|
||||
// name (ID) of the network namespace that will be used for the container.
|
||||
NetworkNamespace string `json:"networkNamespace,omitempty"`
|
||||
}
|
||||
|
||||
// WindowsHyperV contains information for configuring a container to run with Hyper-V isolation.
|
||||
@@ -487,6 +513,42 @@ type WindowsHyperV struct {
|
||||
UtilityVMPath string `json:"utilityVMPath,omitempty"`
|
||||
}
|
||||
|
||||
// VM contains information for virtual-machine-based containers.
|
||||
type VM struct {
|
||||
// Hypervisor specifies hypervisor-related configuration for virtual-machine-based containers.
|
||||
Hypervisor VMHypervisor `json:"hypervisor,omitempty"`
|
||||
// Kernel specifies kernel-related configuration for virtual-machine-based containers.
|
||||
Kernel VMKernel `json:"kernel"`
|
||||
// Image specifies guest image related configuration for virtual-machine-based containers.
|
||||
Image VMImage `json:"image,omitempty"`
|
||||
}
|
||||
|
||||
// VMHypervisor contains information about the hypervisor to use for a virtual machine.
|
||||
type VMHypervisor struct {
|
||||
// Path is the host path to the hypervisor used to manage the virtual machine.
|
||||
Path string `json:"path"`
|
||||
// Parameters specifies parameters to pass to the hypervisor.
|
||||
Parameters string `json:"parameters,omitempty"`
|
||||
}
|
||||
|
||||
// VMKernel contains information about the kernel to use for a virtual machine.
|
||||
type VMKernel struct {
|
||||
// Path is the host path to the kernel used to boot the virtual machine.
|
||||
Path string `json:"path"`
|
||||
// Parameters specifies parameters to pass to the kernel.
|
||||
Parameters string `json:"parameters,omitempty"`
|
||||
// InitRD is the host path to an initial ramdisk to be used by the kernel.
|
||||
InitRD string `json:"initrd,omitempty"`
|
||||
}
|
||||
|
||||
// VMImage contains information about the virtual machine root image.
|
||||
type VMImage struct {
|
||||
// Path is the host path to the root image that the VM kernel would boot into.
|
||||
Path string `json:"path"`
|
||||
// Format is the root image format type (e.g. "qcow2", "raw", "vhd", etc).
|
||||
Format string `json:"format"`
|
||||
}
|
||||
|
||||
// LinuxSeccomp represents syscall restrictions
|
||||
type LinuxSeccomp struct {
|
||||
DefaultAction LinuxSeccompAction `json:"defaultAction"`
|
||||
@@ -561,10 +623,16 @@ type LinuxSyscall struct {
|
||||
Args []LinuxSeccompArg `json:"args,omitempty"`
|
||||
}
|
||||
|
||||
// LinuxIntelRdt has container runtime resource constraints
|
||||
// for Intel RDT/CAT which introduced in Linux 4.10 kernel
|
||||
// LinuxIntelRdt has container runtime resource constraints for Intel RDT
|
||||
// CAT and MBA features which introduced in Linux 4.10 and 4.12 kernel
|
||||
type LinuxIntelRdt struct {
|
||||
// The identity for RDT Class of Service
|
||||
ClosID string `json:"closID,omitempty"`
|
||||
// The schema for L3 cache id and capacity bitmask (CBM)
|
||||
// Format: "L3:<cache_id0>=<cbm0>;<cache_id1>=<cbm1>;..."
|
||||
L3CacheSchema string `json:"l3CacheSchema,omitempty"`
|
||||
|
||||
// The schema of memory bandwidth percentage per L3 cache id
|
||||
// Format: "MB:<cache_id0>=bandwidth0;<cache_id1>=bandwidth1;..."
|
||||
MemBwSchema string `json:"memBwSchema,omitempty"`
|
||||
}
|
||||
|
||||
2
vendor/github.com/opencontainers/runtime-spec/specs-go/version.go
generated
vendored
2
vendor/github.com/opencontainers/runtime-spec/specs-go/version.go
generated
vendored
@@ -11,7 +11,7 @@ const (
|
||||
VersionPatch = 1
|
||||
|
||||
// VersionDev indicates development branch. Releases will be empty string.
|
||||
VersionDev = ""
|
||||
VersionDev = "-dev"
|
||||
)
|
||||
|
||||
// Version is the specification version that the package types support.
|
||||
|
||||
Reference in New Issue
Block a user