@@ -2,6 +2,7 @@ package core
22
33import (
44 "context"
5+ "time"
56
67 "github.com/LambdaTest/test-at-scale/config"
78 "github.com/LambdaTest/test-at-scale/pkg/errs"
@@ -45,7 +46,7 @@ type DockerRunner interface {
4546 // Run runs the execution engine
4647 Run (context.Context , * RunnerOptions ) ContainerStatus
4748
48- //WaitForRunning waits for runner to get completed
49+ // WaitForRunning waits for runner to get completed
4950 WaitForCompletion (ctx context.Context , r * RunnerOptions ) error
5051
5152 // Destroy the execution engine
@@ -62,6 +63,32 @@ type DockerRunner interface {
6263
6364 // KillRunningDocker kills container spawn by synapse
6465 KillRunningDocker (ctx context.Context )
66+
67+ CreateVolume (ctx context.Context , r * RunnerOptions ) error
68+
69+ // RemoveOldVolumes removes volumes that are older than X hours
70+ RemoveOldVolumes (ctx context.Context )
71+
72+ // CopyFileToContainer copies content to container in file
73+ CopyFileToContainer (ctx context.Context , path , fileName , containerID string , content []byte ) error
74+
75+ // FindVolumes checks if docker volume is available
76+ FindVolumes (volumeName string ) (bool , error )
77+
78+ // RemoveVolume removes volume
79+ RemoveVolume (ctx context.Context , volumeName string ) error
80+ }
81+
82+ // VolumeDetails docker volume options
83+ type VolumeDetails struct {
84+ CreatedAt time.Time `json:"CreatedAt,omitempty"`
85+ Driver string `json:"Driver"`
86+ Labels map [string ]string `json:"Labels"`
87+ Mountpoint string `json:"Mountpoint"`
88+ Name string `json:"Name"`
89+ Options map [string ]string `json:"Options"`
90+ Scope string `json:"Scope"`
91+ Status map [string ]interface {} `json:"Status,omitempty"`
6592}
6693
6794// RunnerOptions provides the the required instructions for execution engine.
0 commit comments