No significant changes for our vendored code, but reverts back containerd minimal
dependency to v1.4.9.
full diff: https://github.com/Microsoft/hcsshim/compare/v0.8.20...v0.8.22
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -1,5 +1,5 @@ |
| 1 | 1 |
github.com/Azure/go-ansiterm d185dfc1b5a126116ea5a19e148e29d16b4574c9 |
| 2 |
-github.com/Microsoft/hcsshim 3ad51c76263bad09548a40e1996960814a12a870 # v0.8.20 |
|
| 2 |
+github.com/Microsoft/hcsshim 717ae58b49c5e73b746938f94ae3c696ebd5d932 # v0.8.22 |
|
| 3 | 3 |
github.com/Microsoft/go-winio 6c24dfa01eb5906508a5ad06f4f6534a9be47456 # v0.5.1 |
| 4 | 4 |
github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a |
| 5 | 5 |
github.com/golang/gddo 72a348e765d293ed6d1ded7b699591f14d6cd921 |
| ... | ... |
@@ -6,7 +6,9 @@ require ( |
| 6 | 6 |
github.com/Microsoft/go-winio v0.4.17 |
| 7 | 7 |
github.com/containerd/cgroups v1.0.1 |
| 8 | 8 |
github.com/containerd/console v1.0.2 |
| 9 |
- github.com/containerd/containerd v1.5.1 |
|
| 9 |
+ github.com/containerd/containerd v1.4.9 |
|
| 10 |
+ github.com/containerd/continuity v0.1.0 // indirect |
|
| 11 |
+ github.com/containerd/fifo v1.0.0 // indirect |
|
| 10 | 12 |
github.com/containerd/go-runc v1.0.0 |
| 11 | 13 |
github.com/containerd/ttrpc v1.0.2 |
| 12 | 14 |
github.com/containerd/typeurl v1.0.2 |
| ... | ... |
@@ -19,6 +21,7 @@ require ( |
| 19 | 19 |
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a |
| 20 | 20 |
golang.org/x/sys v0.0.0-20210324051608-47abb6519492 |
| 21 | 21 |
google.golang.org/grpc v1.33.2 |
| 22 |
+ gotest.tools/v3 v3.0.3 // indirect |
|
| 22 | 23 |
) |
| 23 | 24 |
|
| 24 | 25 |
replace ( |
| ... | ... |
@@ -7,6 +7,9 @@ import ( |
| 7 | 7 |
// HNSEndpoint represents a network endpoint in HNS |
| 8 | 8 |
type HNSEndpoint = hns.HNSEndpoint |
| 9 | 9 |
|
| 10 |
+// HNSEndpointStats represent the stats for an networkendpoint in HNS |
|
| 11 |
+type HNSEndpointStats = hns.EndpointStats |
|
| 12 |
+ |
|
| 10 | 13 |
// Namespace represents a Compartment. |
| 11 | 14 |
type Namespace = hns.Namespace |
| 12 | 15 |
|
| ... | ... |
@@ -108,3 +111,8 @@ func GetHNSEndpointByID(endpointID string) (*HNSEndpoint, error) {
|
| 108 | 108 |
func GetHNSEndpointByName(endpointName string) (*HNSEndpoint, error) {
|
| 109 | 109 |
return hns.GetHNSEndpointByName(endpointName) |
| 110 | 110 |
} |
| 111 |
+ |
|
| 112 |
+// GetHNSEndpointStats gets the endpoint stats by ID |
|
| 113 |
+func GetHNSEndpointStats(endpointName string) (*HNSEndpointStats, error) {
|
|
| 114 |
+ return hns.GetHNSEndpointStats(endpointName) |
|
| 115 |
+} |
| ... | ... |
@@ -30,6 +30,7 @@ type HNSEndpoint struct {
|
| 30 | 30 |
EnableLowMetric bool `json:",omitempty"` |
| 31 | 31 |
Namespace *Namespace `json:",omitempty"` |
| 32 | 32 |
EncapOverhead uint16 `json:",omitempty"` |
| 33 |
+ SharedContainers []string `json:",omitempty"` |
|
| 33 | 34 |
} |
| 34 | 35 |
|
| 35 | 36 |
//SystemType represents the type of the system on which actions are done |
| ... | ... |
@@ -57,6 +58,18 @@ type EndpointResquestResponse struct {
|
| 57 | 57 |
Error string |
| 58 | 58 |
} |
| 59 | 59 |
|
| 60 |
+// EndpointStats is the object that has stats for a given endpoint |
|
| 61 |
+type EndpointStats struct {
|
|
| 62 |
+ BytesReceived uint64 `json:"BytesReceived"` |
|
| 63 |
+ BytesSent uint64 `json:"BytesSent"` |
|
| 64 |
+ DroppedPacketsIncoming uint64 `json:"DroppedPacketsIncoming"` |
|
| 65 |
+ DroppedPacketsOutgoing uint64 `json:"DroppedPacketsOutgoing"` |
|
| 66 |
+ EndpointID string `json:"EndpointId"` |
|
| 67 |
+ InstanceID string `json:"InstanceId"` |
|
| 68 |
+ PacketsReceived uint64 `json:"PacketsReceived"` |
|
| 69 |
+ PacketsSent uint64 `json:"PacketsSent"` |
|
| 70 |
+} |
|
| 71 |
+ |
|
| 60 | 72 |
// HNSEndpointRequest makes a HNS call to modify/query a network endpoint |
| 61 | 73 |
func HNSEndpointRequest(method, path, request string) (*HNSEndpoint, error) {
|
| 62 | 74 |
endpoint := &HNSEndpoint{}
|
| ... | ... |
@@ -79,11 +92,27 @@ func HNSListEndpointRequest() ([]HNSEndpoint, error) {
|
| 79 | 79 |
return endpoint, nil |
| 80 | 80 |
} |
| 81 | 81 |
|
| 82 |
+// hnsEndpointStatsRequest makes a HNS call to query the stats for a given endpoint ID |
|
| 83 |
+func hnsEndpointStatsRequest(id string) (*EndpointStats, error) {
|
|
| 84 |
+ var stats EndpointStats |
|
| 85 |
+ err := hnsCall("GET", "/endpointstats/"+id, "", &stats)
|
|
| 86 |
+ if err != nil {
|
|
| 87 |
+ return nil, err |
|
| 88 |
+ } |
|
| 89 |
+ |
|
| 90 |
+ return &stats, nil |
|
| 91 |
+} |
|
| 92 |
+ |
|
| 82 | 93 |
// GetHNSEndpointByID get the Endpoint by ID |
| 83 | 94 |
func GetHNSEndpointByID(endpointID string) (*HNSEndpoint, error) {
|
| 84 | 95 |
return HNSEndpointRequest("GET", endpointID, "")
|
| 85 | 96 |
} |
| 86 | 97 |
|
| 98 |
+// GetHNSEndpointStats get the stats for a n Endpoint by ID |
|
| 99 |
+func GetHNSEndpointStats(endpointID string) (*EndpointStats, error) {
|
|
| 100 |
+ return hnsEndpointStatsRequest(endpointID) |
|
| 101 |
+} |
|
| 102 |
+ |
|
| 87 | 103 |
// GetHNSEndpointByName gets the endpoint filtered by Name |
| 88 | 104 |
func GetHNSEndpointByName(endpointName string) (*HNSEndpoint, error) {
|
| 89 | 105 |
hnsResponse, err := HNSListEndpointRequest() |