juju: github.com/juju/juju/apiserver/facades/client/sshclient Index | Files

package sshclient

import "github.com/juju/juju/apiserver/facades/client/sshclient"

Package sshclient implements the API endpoint required for Juju clients that wish to make SSH connections to Juju managed machines.


Package Files

facade.go shim.go

type Backend Uses

type Backend interface {
    ModelConfig() (*config.Config, error)
    CloudSpec() (environscloudspec.CloudSpec, error)
    GetMachineForEntity(tag string) (SSHMachine, error)
    GetSSHHostKeys(names.MachineTag) (state.SSHHostKeys, error)
    ModelTag() names.ModelTag

Backend defines the State API used by the sshclient facade.

type Facade Uses

type Facade struct {
    // contains filtered or unexported fields

Facade implements the API required by the sshclient worker.

func NewFacade Uses

func NewFacade(ctx facade.Context) (*Facade, error)

NewFacade is used for API registration.

func (*Facade) AllAddresses Uses

func (facade *Facade) AllAddresses(args params.Entities) (params.SSHAddressesResults, error)

AllAddresses reports all addresses that might have SSH listening for each given entity in args. Machines and units are supported as entity types. TODO(wpk): 2017-05-17 This is a temporary solution, we should not fetch environ here but get the addresses from state. We will be changing it since we want to have space-aware SSH settings.

func (*Facade) PrivateAddress Uses

func (facade *Facade) PrivateAddress(args params.Entities) (params.SSHAddressResults, error)

PrivateAddress reports the preferred private network address for one or more entities. Machines and units are supported.

func (*Facade) Proxy Uses

func (facade *Facade) Proxy() (params.SSHProxyResult, error)

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

func (*Facade) PublicAddress Uses

func (facade *Facade) PublicAddress(args params.Entities) (params.SSHAddressResults, error)

PublicAddress reports the preferred public network address for one or more entities. Machines and units are suppored.

func (*Facade) PublicKeys Uses

func (facade *Facade) PublicKeys(args params.Entities) (params.SSHPublicKeysResults, error)

PublicKeys returns the public SSH hosts for one or more entities. Machines and units are supported.

type SSHMachine Uses

type SSHMachine interface {
    MachineTag() names.MachineTag
    PublicAddress() (network.SpaceAddress, error)
    PrivateAddress() (network.SpaceAddress, error)
    Addresses() network.SpaceAddresses
    AllNetworkAddresses() (network.SpaceAddresses, error)

SSHMachine specifies the methods on State.Machine of interest to the SSHClient facade.

Package sshclient imports 14 packages (graph) and is imported by 4 packages. Updated 2020-07-19. Refresh now. Tools for package owners.