[sandbox] Cleanup interfaces
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
18
sandbox.go
18
sandbox.go
@@ -47,12 +47,6 @@ type Sandbox interface {
|
||||
Wait(ctx context.Context) (<-chan ExitStatus, error)
|
||||
// Delete removes sandbox from the metadata store.
|
||||
Delete(ctx context.Context) error
|
||||
// Pause will freeze running sandbox instance
|
||||
Pause(ctx context.Context) error
|
||||
// Resume will unfreeze previously paused sandbox instance
|
||||
Resume(ctx context.Context) error
|
||||
// Ping will check whether existing sandbox instance alive
|
||||
Ping(ctx context.Context) error
|
||||
}
|
||||
|
||||
type sandboxClient struct {
|
||||
@@ -127,18 +121,6 @@ func (s *sandboxClient) Delete(ctx context.Context) error {
|
||||
return s.client.SandboxStore().Delete(ctx, s.ID())
|
||||
}
|
||||
|
||||
func (s *sandboxClient) Pause(ctx context.Context) error {
|
||||
return s.client.SandboxController().Pause(ctx, s.ID())
|
||||
}
|
||||
|
||||
func (s *sandboxClient) Resume(ctx context.Context) error {
|
||||
return s.client.SandboxController().Resume(ctx, s.ID())
|
||||
}
|
||||
|
||||
func (s *sandboxClient) Ping(ctx context.Context) error {
|
||||
return s.client.SandboxController().Ping(ctx, s.ID())
|
||||
}
|
||||
|
||||
// NewSandbox creates new sandbox client
|
||||
func (c *Client) NewSandbox(ctx context.Context, sandboxID string, opts ...NewSandboxOpts) (Sandbox, error) {
|
||||
if sandboxID == "" {
|
||||
|
Reference in New Issue
Block a user