proxy

package
v1.45.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAgentNotFound                      = errors.New("agent not found")
	ErrCredentialFetchNotSupportedByAgent = errors.New("agent does not support credentials fetching")
)

Functions

This section is empty.

Types

type Agent

type Agent struct {
	ConnectedAtIso8601     string `json:"connectedAtIso8601,omitempty"`
	NodeIP                 string `json:"nodeIp,omitempty"`
	OrgID                  string `json:"orgId,omitempty"`
	EnvID                  string `json:"envId,omitempty"`
	K8SClusterRoleSupport  bool   `json:"k8sClusterRoleSupport,omitempty"`
	AgentIdentifier        string `json:"agentIdentifier,omitempty"`
	AgentVersion           string `json:"agentVersion,omitempty"`
	IPAddress              string `json:"ipAddress,omitempty"`
	LastHeartbeatAtIso8601 string `json:"lastHeartbeatAtIso8601,omitempty"`
	StreamID               string `json:"streamId,omitempty"`
}

type AgentGroup

type AgentGroup struct {
	AgentIdentifier string `json:"agentIdentifier"`
	OrganizationId  string `json:"orgId"`
	EnvironmentId   string `json:"envId"`
}

type KubernetesCredentials

type KubernetesCredentials struct {
	Error                        string `json:"error"`
	StackTrace                   string `json:"stackTrace"`
	RootCaBase64EncodedByteArray string `json:"rootCa"`
	TokenBase64EncodedByteArray  string `json:"tokenFile"`
	Host                         string `json:"host"`
	Port                         int32  `json:"port"`
}

type SessionCredentials

type SessionCredentials struct {
	User                  string                `json:"user"`
	Password              string                `json:"password"`
	Host                  string                `json:"host"`
	Port                  int                   `json:"port"`
	ExpiresAt             time.Time             `json:"expiresAtIso8601"`
	KubernetesCredentials KubernetesCredentials `json:"kubernetesCredentials"`
}

type SessionOverrides

type SessionOverrides struct {
	User string
	Host string
	Port int
}

type WormholeService

type WormholeService struct {
	WormholeBaseURL  string
	SessionOverrides *SessionOverrides
	// contains filtered or unexported fields
}

func (*WormholeService) GetKubernetesClusterCredentialsFromAgent

func (ws *WormholeService) GetKubernetesClusterCredentialsFromAgent(ctx context.Context, agentGroup *AgentGroup) (*KubernetesCredentials, error)

func (*WormholeService) GetProxyConfiguredTransport

func (ws *WormholeService) GetProxyConfiguredTransport(ctx context.Context, agentGroup *AgentGroup) (*http.Transport, error)

func (*WormholeService) GetProxyEnabledClusterConfig

func (ws *WormholeService) GetProxyEnabledClusterConfig(ctx context.Context, agentGroup *AgentGroup) (*rest.Config, error)

func (*WormholeService) GetProxyFunction

func (ws *WormholeService) GetProxyFunction(ctx context.Context, agentGroup *AgentGroup) (func(*http.Request) (*url.URL, error), error)

func (*WormholeService) ListAgents

func (ws *WormholeService) ListAgents(ctx context.Context, orgID, envID string) ([]*Agent, error)

type WormholeServiceParameters added in v1.34.0

type WormholeServiceParameters struct {
	Client    *http.Client
	BaseURL   string
	Overrides *SessionOverrides
	Logger    *zap.SugaredLogger
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL