Documentation ¶
Overview ¶
Package function contains the core functions of nephele.
Index ¶
- Constants
- func NewSession() *session.Session
- type EC2
- type EC2Service
- func (e *EC2Service) GetAllInstances() (*ec2.DescribeInstancesOutput, error)
- func (e *EC2Service) GetInstances() ([][]string, error)
- func (e *EC2Service) LoadFiltersFromFile(filtersFile string) error
- func (e *EC2Service) SetFilters(filters []string) error
- func (e *EC2Service) StartInstances(dryRun bool) (*ec2.StartInstancesOutput, error)
- func (e *EC2Service) StopInstances(dryRun bool) (*ec2.StopInstancesOutput, error)
- type Function
- type LambdaService
- type RDS
- type RDSService
- type S3
- type S3Options
- type S3Service
Constants ¶
const InvocationType = "RequestResponse"
Invocation type for invoking the Lambda function.
Variables ¶
This section is empty.
Functions ¶
func NewSession ¶ added in v0.3.0
NewSession returns an instance of AWS Session.
Types ¶
type EC2 ¶ added in v0.3.0
type EC2 struct {
IDs []string // List of EC2 instance IDs
}
EC2 represents the AWS EC2 instance fields.
type EC2Service ¶ added in v0.3.0
type EC2Service struct { EC2 Filters []*ec2.Filter // List of filters to apply for EC2 list Service ec2iface.EC2API }
EC2Service represents the EC2 interface.
func (*EC2Service) GetAllInstances ¶ added in v0.3.0
func (e *EC2Service) GetAllInstances() (*ec2.DescribeInstancesOutput, error)
GetAllInstances gets all the EC2 instances info and returns them as it is.
func (*EC2Service) GetInstances ¶ added in v0.3.0
func (e *EC2Service) GetInstances() ([][]string, error)
GetInstances returns the list of specific fields of AWS EC2 instances as multidimensional slice suitable for rendering on a terminal ASCII table.
func (*EC2Service) LoadFiltersFromFile ¶ added in v0.3.0
func (e *EC2Service) LoadFiltersFromFile(filtersFile string) error
LoadFiltersFromFile loads the user provided filters that are present in the json file to the Filters by replacing them with actual filter keys.
func (*EC2Service) SetFilters ¶ added in v0.3.0
func (e *EC2Service) SetFilters(filters []string) error
SetFilters sets the user provided filter list to the Filters by replacing the user provided filter keys with the actual filter keys and returns an error, if any.
func (*EC2Service) StartInstances ¶ added in v0.3.0
func (e *EC2Service) StartInstances(dryRun bool) (*ec2.StartInstancesOutput, error)
StartInstances starts the specified instance(s) and returns the state change information of each instance.
func (*EC2Service) StopInstances ¶ added in v0.3.0
func (e *EC2Service) StopInstances(dryRun bool) (*ec2.StopInstancesOutput, error)
StopInstances stops the specified instance(s) and returns the state change information of each instance.
type Function ¶ added in v0.3.0
type Function struct {
Name string // Name of the Lambda function
}
Function represents the Lambda function fields.
type LambdaService ¶ added in v0.3.0
type LambdaService struct { Function Service lambdaiface.LambdaAPI }
LambdaService represents the Lambda interface.
func (*LambdaService) GetFunctions ¶ added in v0.3.0
func (l *LambdaService) GetFunctions() (*lambda.ListFunctionsOutput, error)
GetFunctions returns the list of all the Lambda functions with their configurations.
func (*LambdaService) InvokeFunction ¶ added in v0.3.0
func (l *LambdaService) InvokeFunction() (*lambda.InvokeOutput, error)
InvokeFunction invokes the specified function in RequestResponse invocation type and returns the status code.
type RDSService ¶ added in v0.3.0
RDSService represents the RDS interface.
func (*RDSService) GetRDSInstances ¶ added in v0.3.0
func (r *RDSService) GetRDSInstances() ([][]string, error)
GetRDSInstances returns the list of specific fields of AWS RDS instances as multidimensional slice suitable for rendering on a terminal ASCII table.
func (*RDSService) StartInstance ¶ added in v0.5.0
func (r *RDSService) StartInstance() (*rds.StartDBInstanceOutput, error)
StartInstance starts the specified RDS instance and returns the state change information of that instance.
func (*RDSService) StopInstance ¶ added in v0.5.0
func (r *RDSService) StopInstance() (*rds.StopDBInstanceOutput, error)
StopInstance stops the specified RDS instance and returns the state change information of that instance.
type S3 ¶ added in v0.3.0
type S3 struct { Name string `json:"bucket_name"` // S3 bucket name Key string `json:"object_name"` // The S3 object key. FileName string `json:"file_name"` // The file to write the contents of the s3 object. Downloader s3manageriface.DownloaderAPI }
S3 represents the S3 bucket fields.
type S3Options ¶ added in v0.4.0
type S3Options struct { ContinuationToken string // Continuation token for fetching previous or next set of records MaxCount int64 // Maximum objects to fetch per request Prefix string // Prefix of the S3 objects }
S3Options represents the optional arguments for S3.
type S3Service ¶ added in v0.3.0
S3Service represents the S3 interface.
func (*S3Service) DownloadObject ¶ added in v0.4.0
DownloadObject downloads a single S3 object from a bucket to the specified location on the system.
func (*S3Service) GetBuckets ¶ added in v0.3.0
func (s *S3Service) GetBuckets() (*s3.ListBucketsOutput, error)
GetBuckets returns the list of all the S3 buckets.
func (*S3Service) GetObjects ¶ added in v0.4.0
func (s *S3Service) GetObjects() (*s3.ListObjectsV2Output, error)
GetObjects returns the list of all the S3 objects from the specified bucket.
func (*S3Service) MultiObjectDownload ¶ added in v0.4.0
MultiObjectDownload will parse the provided json file containing list of objects and downloads the S3 objects provided in the file concurrently in batch into the file names provided in the json file.