Skip to content

Commit

Permalink
runtime: containerd-shim-v2: fix govet fieldalignment
Browse files Browse the repository at this point in the history
Fix structures alignment

Signed-off-by: Julio Montes <julio.montes@intel.com>
  • Loading branch information
Julio Montes committed Jul 20, 2021
1 parent 0dc59df commit 2b80091
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 deletions.
18 changes: 10 additions & 8 deletions src/runtime/containerd-shim-v2/exec.go
Expand Up @@ -24,19 +24,21 @@ type exec struct {
cmds *types.Cmd
tty *tty
ttyio *ttyIO
id string

exitCode int32

status task.Status
stdinPipe io.WriteCloser

exitIOch chan struct{}
exitCh chan uint32
exitTime time.Time

exitIOch chan struct{}
stdinCloser chan struct{}
stdinPipe io.WriteCloser

exitTime time.Time
exitCh chan uint32

id string

exitCode int32

status task.Status
}

type tty struct {
Expand Down
33 changes: 19 additions & 14 deletions src/runtime/containerd-shim-v2/service.go
Expand Up @@ -106,15 +106,33 @@ func New(ctx context.Context, id string, publisher cdshim.Publisher, shutdown fu
}

type exit struct {
timestamp time.Time
id string
execid string
pid uint32
status int
timestamp time.Time
}

// service is the shim implementation of a remote shim over GRPC
type service struct {
sandbox vc.VCSandbox

ctx context.Context
rootCtx context.Context // root context for tracing

containers map[string]*container

config *oci.RuntimeConfig

monitor chan error
ec chan exit

events chan interface{}

cancel func()

id string

mu sync.Mutex
eventSendMu sync.Mutex

Expand All @@ -125,19 +143,6 @@ type service struct {

// shim's pid
pid uint32

ctx context.Context
rootCtx context.Context // root context for tracing
sandbox vc.VCSandbox
containers map[string]*container
config *oci.RuntimeConfig
events chan interface{}
monitor chan error

cancel func()

ec chan exit
id string
}

func newCommand(ctx context.Context, id, containerdBinary, containerdAddress string) (*sysexec.Cmd, error) {
Expand Down

0 comments on commit 2b80091

Please sign in to comment.