@@ -21,7 +21,6 @@ package proc
2121import (
2222 "context"
2323
24- "github.com/containerd/console"
2524 "github.com/containerd/containerd/runtime/proc"
2625 runc "github.com/containerd/go-runc"
2726 google_protobuf "github.com/gogo/protobuf/types"
@@ -30,7 +29,6 @@ import (
3029)
3130
3231type initState interface {
33- Resize (console.WinSize ) error
3432 Start (context.Context ) error
3533 Delete (context.Context ) error
3634 Pause (context.Context ) error
@@ -76,10 +74,6 @@ func (s *createdState) Checkpoint(ctx context.Context, r *CheckpointConfig) erro
7674 return errors .Errorf ("cannot checkpoint a task in created state" )
7775}
7876
79- func (s * createdState ) Resize (ws console.WinSize ) error {
80- return s .p .resize (ws )
81- }
82-
8377func (s * createdState ) Start (ctx context.Context ) error {
8478 if err := s .p .start (ctx ); err != nil {
8579 return err
@@ -145,10 +139,6 @@ func (s *createdCheckpointState) Checkpoint(ctx context.Context, r *CheckpointCo
145139 return errors .Errorf ("cannot checkpoint a task in created state" )
146140}
147141
148- func (s * createdCheckpointState ) Resize (ws console.WinSize ) error {
149- return s .p .resize (ws )
150- }
151-
152142func (s * createdCheckpointState ) Start (ctx context.Context ) error {
153143 p := s .p
154144 sio := p .stdio
@@ -255,10 +245,6 @@ func (s *runningState) Checkpoint(ctx context.Context, r *CheckpointConfig) erro
255245 return s .p .checkpoint (ctx , r )
256246}
257247
258- func (s * runningState ) Resize (ws console.WinSize ) error {
259- return s .p .resize (ws )
260- }
261-
262248func (s * runningState ) Start (ctx context.Context ) error {
263249 return errors .Errorf ("cannot start a running process" )
264250}
@@ -319,10 +305,6 @@ func (s *pausedState) Checkpoint(ctx context.Context, r *CheckpointConfig) error
319305 return s .p .checkpoint (ctx , r )
320306}
321307
322- func (s * pausedState ) Resize (ws console.WinSize ) error {
323- return s .p .resize (ws )
324- }
325-
326308func (s * pausedState ) Start (ctx context.Context ) error {
327309 return errors .Errorf ("cannot start a paused process" )
328310}
@@ -381,10 +363,6 @@ func (s *stoppedState) Checkpoint(ctx context.Context, r *CheckpointConfig) erro
381363 return errors .Errorf ("cannot checkpoint a stopped container" )
382364}
383365
384- func (s * stoppedState ) Resize (ws console.WinSize ) error {
385- return errors .Errorf ("cannot resize a stopped container" )
386- }
387-
388366func (s * stoppedState ) Start (ctx context.Context ) error {
389367 return errors .Errorf ("cannot start a stopped process" )
390368}
0 commit comments