From 4efc61d1ae359149d7534857a21d788d0e44d6e4 Mon Sep 17 00:00:00 2001 From: Onur Filiz Date: Fri, 3 Aug 2018 11:48:27 -0700 Subject: [PATCH] Fargate: Add stubs for new provider APIs --- providers/aws/config.go | 2 +- providers/aws/provider.go | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/providers/aws/config.go b/providers/aws/config.go index 77ea9f04c..45a9ac94f 100644 --- a/providers/aws/config.go +++ b/providers/aws/config.go @@ -63,7 +63,7 @@ func (p *FargateProvider) loadConfigFile(filePath string) error { return err } -// loadConfigStream loads the given Fargate provider TOML configuration stream. +// loadConfig loads the given Fargate provider TOML configuration stream. func (p *FargateProvider) loadConfig(r io.Reader) error { var config providerConfig var q resource.Quantity diff --git a/providers/aws/provider.go b/providers/aws/provider.go index ffe9411b4..ed76f5621 100644 --- a/providers/aws/provider.go +++ b/providers/aws/provider.go @@ -178,17 +178,18 @@ func (p *FargateProvider) GetContainerLogs(namespace, podName, containerName str return p.cluster.GetContainerLogs(namespace, podName, containerName, tail) } -// Get full pod name as defined in the provider context +// GetPodFullName retrieves the full pod name as defined in the provider context. func (p *FargateProvider) GetPodFullName(namespace string, pod string) string { return "" } // ExecInContainer executes a command in a container in the pod, copying data // between in/out/err and the container's stdin/stdout/stderr. -// TODO: Implementation -func (p *FargateProvider) ExecInContainer(name string, uid types.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error { - log.Printf("receive ExecInContainer %q\n", container) - return nil +func (p *FargateProvider) ExecInContainer( + name string, uid types.UID, container string, cmd []string, in io.Reader, out, err io.WriteCloser, + tty bool, resize <-chan remotecommand.TerminalSize, timeout time.Duration) error { + log.Printf("Received ExecInContainer request for %s.\n", container) + return errNotImplemented } // GetPodStatus retrieves the status of a pod by name from the provider.