Documentation
¶
Overview ¶
Package sshclient implements the API endpoint required for Juju clients that wish to make SSH connections to Juju managed machines.
Index ¶
- func Register(registry facade.FacadeRegistry)
- type Backend
- type Broker
- type Facade
- func (facade *Facade) AllAddresses(ctx context.Context, args params.Entities) (params.SSHAddressesResults, error)
- func (facade *Facade) ModelCredentialForSSH(ctx context.Context) (params.CloudSpecResult, error)
- func (facade *Facade) PrivateAddress(ctx context.Context, args params.Entities) (params.SSHAddressResults, error)
- func (facade *Facade) Proxy(ctx context.Context) (params.SSHProxyResult, error)
- func (facade *Facade) PublicAddress(ctx context.Context, args params.Entities) (params.SSHAddressResults, error)
- func (facade *Facade) PublicKeys(ctx context.Context, args params.Entities) (params.SSHPublicKeysResults, error)
- type Model
- type ModelConfigService
- type NetworkService
- type SSHMachine
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type Backend ¶
type Backend interface { GetMachineForEntity(tag string) (SSHMachine, error) GetSSHHostKeys(names.MachineTag) (state.SSHHostKeys, error) ModelTag() names.ModelTag ControllerTag() names.ControllerTag Model() (Model, error) CloudSpec(context.Context) (environscloudspec.CloudSpec, error) }
Backend defines the State API used by the sshclient facade.
type Facade ¶
type Facade struct {
// contains filtered or unexported fields
}
Facade implements the API required by the sshclient worker.
func (*Facade) AllAddresses ¶
func (facade *Facade) AllAddresses(ctx context.Context, args params.Entities) (params.SSHAddressesResults, error)
AllAddresses reports all addresses that might have SSH listening for each entity in args. The result is sorted with public addresses first. Machines and units are supported as entity types.
func (*Facade) ModelCredentialForSSH ¶
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, 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 ¶
Proxy returns whether SSH connections should be proxied through the controller hosts for the model associated with the API connection.
func (*Facade) PublicAddress ¶
func (facade *Facade) PublicAddress(ctx context.Context, args params.Entities) (params.SSHAddressResults, error)
PublicAddress reports the preferred public network address for one or more entities. Machines and units are supported.
func (*Facade) PublicKeys ¶
func (facade *Facade) PublicKeys(ctx context.Context, args params.Entities) (params.SSHPublicKeysResults, error)
PublicKeys returns the public SSH hosts for one or more entities. Machines and units are supported.
type ModelConfigService ¶
ModelConfigService is an interface that provides access to the model configuration.
type NetworkService ¶
type NetworkService interface { // GetAllSubnets returns all the subnets for the model. GetAllSubnets(ctx context.Context) (network.SubnetInfos, error) }
NetworkService is the interface that is used to interact with the network spaces/subnets.
type SSHMachine ¶
type SSHMachine interface { MachineTag() names.MachineTag PublicAddress() (network.SpaceAddress, error) PrivateAddress() (network.SpaceAddress, error) Addresses() network.SpaceAddresses AllDeviceSpaceAddresses(context.Context) (network.SpaceAddresses, error) }
SSHMachine specifies the methods on State.Machine of interest to the SSHClient facade.