runservice executor: remove unused GetPodByID method
This commit is contained in:
parent
a0d69f4bc3
commit
7c9be9b57d
|
@ -302,28 +302,6 @@ func podLabelsFromContainer(containerLabels map[string]string) map[string]string
|
|||
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 {
|
||||
id string
|
||||
client *client.Client
|
||||
|
|
|
@ -45,7 +45,6 @@ type Driver interface {
|
|||
Setup(ctx context.Context) error
|
||||
NewPod(ctx context.Context, podConfig *PodConfig, out io.Writer) (Pod, error)
|
||||
GetPods(ctx context.Context, all bool) ([]Pod, error)
|
||||
GetPodByID(ctx context.Context, containerID string) (Pod, error)
|
||||
ExecutorGroup(ctx context.Context) (string, error)
|
||||
GetExecutors(ctx context.Context) ([]string, error)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue