runservice executor: remove unused GetPodByID method

This commit is contained in:
Simone Gotti 2019-04-24 15:53:03 +02:00
parent a0d69f4bc3
commit 7c9be9b57d
2 changed files with 0 additions and 23 deletions

View File

@ -302,28 +302,6 @@ func podLabelsFromContainer(containerLabels map[string]string) map[string]string
return labels return labels
} }
func (d *DockerDriver) GetPodByID(ctx context.Context, podID string) (Pod, error) {
args := filters.NewArgs()
args.Add(podIDKey, podID)
containers, err := d.client.ContainerList(ctx,
types.ContainerListOptions{
Filters: args,
})
if err != nil {
return nil, err
}
if len(containers) == 0 {
return nil, errors.Errorf("no pod with id %s", podID)
}
return &DockerPod{
labels: podLabelsFromContainer(containers[0].Labels),
client: d.client,
containers: containers,
}, nil
}
type DockerPod struct { type DockerPod struct {
id string id string
client *client.Client client *client.Client

View File

@ -45,7 +45,6 @@ type Driver interface {
Setup(ctx context.Context) error Setup(ctx context.Context) error
NewPod(ctx context.Context, podConfig *PodConfig, out io.Writer) (Pod, error) NewPod(ctx context.Context, podConfig *PodConfig, out io.Writer) (Pod, error)
GetPods(ctx context.Context, all bool) ([]Pod, error) GetPods(ctx context.Context, all bool) ([]Pod, error)
GetPodByID(ctx context.Context, containerID string) (Pod, error)
ExecutorGroup(ctx context.Context) (string, error) ExecutorGroup(ctx context.Context) (string, error)
GetExecutors(ctx context.Context) ([]string, error) GetExecutors(ctx context.Context) ([]string, error)
} }