mirror of
https://github.com/rancher/plugins.git
synced 2025-09-01 05:47:44 +00:00
Windows: Updates Windows Vendoring
Updates windows dependent libraries for vendoing.
This commit is contained in:
20
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_state.go
generated
vendored
Normal file
20
vendor/github.com/Microsoft/hcsshim/pkg/go-runhcs/runhcs_state.go
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
package runhcs
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// State outputs the state of a container.
|
||||
func (r *Runhcs) State(context context.Context, id string) (*ContainerState, error) {
|
||||
data, err := cmdOutput(r.command(context, "state", id), true)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%s: %s", err, data)
|
||||
}
|
||||
var out ContainerState
|
||||
if err := json.Unmarshal(data, &out); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &out, nil
|
||||
}
|
Reference in New Issue
Block a user