Documentation ¶
Index ¶
- Constants
- func AppendUserAgent(suffix string) error
- func VerifyDependencies() error
- type Cloud
- type CloudInstances
- type CloudSSH
- type CloudSessions
- type Config
- type Filters
- type Instance
- type InstanceFilters
- type Provider
- func (p *Provider) ListInstances() ([]*Instance, error)
- func (p *Provider) ListSessions() ([]*Session, error)
- func (p *Provider) NewWithConfig(c *Config) error
- func (p *Provider) StartSSH(targetType, target, osUser string, portNumber uint64, publicKey []byte) error
- func (p *Provider) StartSession(targetType, target string) error
- func (p *Provider) TerminateSession(sessionID string) error
- type Session
- type SessionFilters
- type TagValues
Constants ¶
const ( // TargetTypeInstanceID points to an instance ID type TargetTypeInstanceID = "instance-id" // TargetTypePrivateDNS points to a private DNS type TargetTypePrivateDNS = "private-dns" // TargetTypeName points to a name type TargetTypeName = "name" )
Variables ¶
This section is empty.
Functions ¶
func AppendUserAgent ¶
AppendUserAgent will add given suffix to HTTP client's user agent
func VerifyDependencies ¶
func VerifyDependencies() error
VerifyDependencies will check all necessary dependencies
Types ¶
type CloudInstances ¶
type CloudInstances interface { Cloud ListInstances() ([]*Instance, error) StartSession(targetType, target string) error }
CloudInstances wraps instances methods used from the aws package
type CloudSSH ¶
type CloudSSH interface { Cloud StartSSH(targetType, target, osUser string, portNumber uint64, publicKey []byte) error }
CloudSSH wraps ssh methods used from the aws package
type CloudSessions ¶
type CloudSessions interface { Cloud ListSessions() ([]*Session, error) TerminateSession(sessionID string) error }
CloudSessions wraps sessions methods used from the aws package
type Filters ¶
type Filters struct { Instance InstanceFilters `mapstructure:"instance"` Session SessionFilters `mapstructure:"session"` }
Filters grouped per type
type Instance ¶
type Instance struct { Hostname string `json:"hostname" yaml:"hostname"` IPAddress string `json:"ip_address" yaml:"ip_address"` ID string `json:"id" yaml:"id"` PrivateDNSName string `json:"private_dns_name" yaml:"private_dns_name"` Name string `json:"name" yaml:"name"` OSName string `json:"os_name" yaml:"os_name"` OSType string `json:"os_type" yaml:"os_type"` OSVersion string `json:"os_version" yaml:"os_version"` }
Instance contain information about the EC2 instance
type InstanceFilters ¶
type InstanceFilters struct { IDs []string `json:"ids" mapstructure:"ids,remain"` Tags []TagValues `json:"tags" mapstructure:"tags,remain"` }
InstanceFilters contain all types of filters used to limit results
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider contains necessary components like the session
func (*Provider) ListInstances ¶
ListInstances provides a list of active instances with SSM agent
func (*Provider) ListSessions ¶
ListSessions provides a list of active SSM sessions
func (*Provider) NewWithConfig ¶
NewWithConfig will generate an AWS Provider with given configuration
func (*Provider) StartSSH ¶
func (p *Provider) StartSSH(targetType, target, osUser string, portNumber uint64, publicKey []byte) error
StartSSH will start a ssh proxy session for a chosed node
func (*Provider) StartSession ¶
StartSession will start a session for a chosed node
func (*Provider) TerminateSession ¶
TerminateSession will close chosed active session
type Session ¶
type Session struct { SessionID string `json:"session_id" yaml:"session_id"` Target string `json:"target" yaml:"target"` Status string `json:"status" yaml:"status"` StartDate string `json:"start_date" yaml:"start_date"` Owner string `json:"owner" yaml:"owner"` }
Session contains information about SSM sessions
type SessionFilters ¶
type SessionFilters struct { After string `json:"after" mapstructure:"after,remain"` Before string `json:"before" mapstructure:"before,remain"` Target string `json:"target" mapstructure:"target,remain"` Owner string `json:"owner" mapstructure:"owner,remain"` }
SessionFilters for SSM sessions