connections

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 16 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 {
	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 {
	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.

Jump to

Keyboard shortcuts

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