Help us shape the future of Go! Take the 2026 Go Developer Survey

connections

package
v0.62.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

connections contains functionality for using the workspace.Connection concept of the CLI to connect and interact with the remote endpoints that are described by the workspace concept (Radius control plane, environment, et al).

Index

Constants

This section is empty.

Variables

View Source
var DefaultFactory = &impl{}

DefaultFactory provides easy access to the default implementation of the factory. DO NOT modify this in your code. Even if it's for tests. DO NOT DO IT.

Functions

This section is empty.

Types

type Factory

type Factory interface {
	GetControlPlaneVersion(ctx context.Context, workspace workspaces.Workspace) (version.VersionInfo, error)
	CreateDeploymentClient(ctx context.Context, workspace workspaces.Workspace) (clients.DeploymentClient, error)
	CreateDiagnosticsClient(ctx context.Context, workspace workspaces.Workspace) (clients.DiagnosticsClient, error)
	CreateApplicationsManagementClient(ctx context.Context, workspace workspaces.Workspace) (clients.ApplicationsManagementClient, error)
	CreateCredentialManagementClient(ctx context.Context, workspace workspaces.Workspace) (cli_credential.CredentialManagementClient, error)
}

ConnectionFactory is a mockable abstraction for our client-server interactions.

type MockFactory

type MockFactory struct {
	ControlPlaneVersion          version.VersionInfo
	ControlPlaneVersionError     error
	DeploymentClient             clients.DeploymentClient
	DeploymentClientError        error
	ApplicationsManagementClient clients.ApplicationsManagementClient
	CredentialManagementClient   cli_credential.CredentialManagementClient
	DiagnosticsClient            clients.DiagnosticsClient
}

func (*MockFactory) CreateApplicationsManagementClient

func (f *MockFactory) CreateApplicationsManagementClient(ctx context.Context, workspace workspaces.Workspace) (clients.ApplicationsManagementClient, error)

CreateApplicationsManagementClient function takes in a context and a workspace and returns an ApplicationsManagementClient and an error if one occurs.

func (*MockFactory) CreateCredentialManagementClient

func (f *MockFactory) CreateCredentialManagementClient(ctx context.Context, workspace workspaces.Workspace) (cli_credential.CredentialManagementClient, error)

CreateCredentialManagementClient function takes in a context and a workspace and returns a CredentialManagementClient and does not return an error.

func (*MockFactory) CreateDeploymentClient

func (f *MockFactory) CreateDeploymentClient(ctx context.Context, workspace workspaces.Workspace) (clients.DeploymentClient, error)

CreateDeploymentClient function takes in a context and a workspace and returns a DeploymentClient and an error, if any.

func (*MockFactory) CreateDiagnosticsClient

func (f *MockFactory) CreateDiagnosticsClient(ctx context.Context, workspace workspaces.Workspace) (clients.DiagnosticsClient, error)

CreateDiagnosticsClient function takes in a context and a workspace and returns a DiagnosticsClient without any errors.

func (*MockFactory) GetControlPlaneVersion added in v0.62.0

func (f *MockFactory) GetControlPlaneVersion(ctx context.Context, workspace workspaces.Workspace) (version.VersionInfo, error)

GetControlPlaneVersion returns the configured version result.

Jump to

Keyboard shortcuts

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