Add a context parameter so we can enforce a timeout for the token exchange.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer
2020-07-28 15:15:59 -05:00
parent 0ee4f0417d
commit 1a349bb609
3 changed files with 47 additions and 18 deletions
+7 -5
View File
@@ -5,11 +5,13 @@ SPDX-License-Identifier: Apache-2.0
package client
import "k8s.io/client-go/pkg/apis/clientauthentication"
import (
"context"
func ExchangeToken(token, caBundle, apiEndpoint string) (*clientauthentication.ExecCredential, error) {
_ = token
_ = caBundle
_ = apiEndpoint
"k8s.io/client-go/pkg/apis/clientauthentication"
)
func ExchangeToken(ctx context.Context, token, caBundle, apiEndpoint string) (*clientauthentication.ExecCredential, error) {
_, _, _, _ = ctx, token, caBundle, apiEndpoint
return nil, nil
}