sshclient

package
v0.0.0-...-0a271de Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: AGPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithTracer = base.WithTracer

WithTracer returns an Option that configures the Client to use the supplied tracer.

Functions

This section is empty.

Types

type Facade

type Facade struct {
	base.ClientFacade
	// contains filtered or unexported fields
}

func NewFacade

func NewFacade(callCloser base.APICallCloser, options ...Option) *Facade

NewFacade returns a new Facade based on an existing API connection.

func (*Facade) AllAddresses

func (facade *Facade) AllAddresses(ctx context.Context, target string) ([]string, error)

AllAddresses returns all addresses for the SSH target provided. The target may be provided as a machine ID or unit name.

func (*Facade) ModelCredentialForSSH

func (facade *Facade) ModelCredentialForSSH(ctx context.Context) (cloudspec.CloudSpec, error)

ModelCredentialForSSH returns a cloud spec for ssh purpose. This facade call is only used for k8s model.

func (*Facade) PrivateAddress

func (facade *Facade) PrivateAddress(ctx context.Context, target string) (string, error)

PrivateAddress returns the private address for the SSH target provided. The target may be provided as a machine ID or unit name.

func (*Facade) Proxy

func (facade *Facade) Proxy(ctx context.Context) (bool, error)

Proxy returns whether SSH connections should be proxied through the controller hosts for the associated model.

func (*Facade) PublicAddress

func (facade *Facade) PublicAddress(ctx context.Context, target string) (string, error)

PublicAddress returns the public address for the SSH target provided. The target may be provided as a machine ID or unit name.

func (*Facade) PublicKeys

func (facade *Facade) PublicKeys(ctx context.Context, target string) ([]string, error)

PublicKeys returns the SSH public host keys for the SSH target provided. The target may be provided as a machine ID or unit name.

type Option

type Option = base.Option

Option is a function that can be used to configure a Client.

Jump to

Keyboard shortcuts

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