Go HTTP client for credential provider sidecar, issuing STS tokens and kubeconfig, with error handling.
// Source: https://github.com/agentscope-ai/AgentTeams | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package credprovider
import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"strings"
"time"
)
// Client issues STS tokens by calling the agentteams-credential-provider sidecar.
type Client interface {
// Issue asks the sidecar for an STS triple matching req.
// A non-nil error means either the HTTP call failed or the sidecar
// returned a non-2xx status.
Issue(ctx context.Context, req IssueRequest) (*IssueResponse, error)
// GetKubeconfig obtains a temporary kubeconfig for the given cluster.
GetKubeconfig(ctx context.Context, clusterID string)
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key