Re-think integration vendoring
- remove docker/docker from Traefik vendor (unused) - use `ignore` for all Traefik vendor in integration glide. - defined only integration specific version of the dependencies.
This commit is contained in:
parent
121c057b90
commit
22aceec426
1750 changed files with 5786 additions and 552456 deletions
60
integration/vendor/github.com/opencontainers/runc/state.go
generated
vendored
Normal file
60
integration/vendor/github.com/opencontainers/runc/state.go
generated
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
// +build linux
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
|
||||
"github.com/opencontainers/runc/libcontainer"
|
||||
"github.com/opencontainers/runc/libcontainer/utils"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
var stateCommand = cli.Command{
|
||||
Name: "state",
|
||||
Usage: "output the state of a container",
|
||||
ArgsUsage: `<container-id>
|
||||
|
||||
Where "<container-id>" is your name for the instance of the container.`,
|
||||
Description: `The state command outputs current state information for the
|
||||
instance of a container.`,
|
||||
Action: func(context *cli.Context) error {
|
||||
if err := checkArgs(context, 1, exactArgs); err != nil {
|
||||
return err
|
||||
}
|
||||
container, err := getContainer(context)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
containerStatus, err := container.Status()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
state, err := container.State()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
pid := state.BaseState.InitProcessPid
|
||||
if containerStatus == libcontainer.Stopped {
|
||||
pid = 0
|
||||
}
|
||||
bundle, annotations := utils.Annotations(state.Config.Labels)
|
||||
cs := containerState{
|
||||
Version: state.BaseState.Config.Version,
|
||||
ID: state.BaseState.ID,
|
||||
InitProcessPid: pid,
|
||||
Status: containerStatus.String(),
|
||||
Bundle: bundle,
|
||||
Rootfs: state.BaseState.Config.Rootfs,
|
||||
Created: state.BaseState.Created,
|
||||
Annotations: annotations,
|
||||
}
|
||||
data, err := json.MarshalIndent(cs, "", " ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
os.Stdout.Write(data)
|
||||
return nil
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue