Documentation ¶
Index ¶
- Constants
- type Aurora
- type AuroraTypeClient
- type EC2
- type EC2TypeClient
- type Fargate
- type FargateTypeClient
- type MessageBus
- type Period
- type RDS
- type RDSTypeClient
- type Report
- type Resource
- type ResourceClientArgs
- type ResourceClientsFactory
- type ResourceState
- type Resources
- type ResourcesClient
- type ResourcesState
- type SNS
- type SSM
- type SSMTypeClient
- type SchedulerConfig
- type SchedulerConfigClient
- type SchedulerService
Constants ¶
View Source
const (
AutoscalingGroup = "ASG"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aurora ¶
type Aurora struct {
// contains filtered or unexported fields
}
func (*Aurora) Sleep ¶
func (r *Aurora) Sleep(args ResourceClientArgs) (ResourcesState, error)
func (*Aurora) WakeUp ¶
func (r *Aurora) WakeUp(args ResourceClientArgs) (ResourcesState, error)
type AuroraTypeClient ¶
type AuroraTypeClient interface { StopDBCluster(ctx context.Context, params *rds.StopDBClusterInput, optFns ...func(*rds.Options)) (*rds.StopDBClusterOutput, error) StartDBCluster(ctx context.Context, params *rds.StartDBClusterInput, optFns ...func(*rds.Options)) (*rds.StartDBClusterOutput, error) }
type EC2 ¶
type EC2 struct {
// contains filtered or unexported fields
}
func (*EC2) Sleep ¶
func (e *EC2) Sleep(args ResourceClientArgs) (ResourcesState, error)
func (*EC2) WakeUp ¶
func (e *EC2) WakeUp(args ResourceClientArgs) (ResourcesState, error)
type EC2TypeClient ¶
type EC2TypeClient interface { StopInstances(ctx context.Context, params *ec2.StopInstancesInput, optFns ...func(*ec2.Options)) (*ec2.StopInstancesOutput, error) StartInstances(ctx context.Context, params *ec2.StartInstancesInput, optFns ...func(*ec2.Options)) (*ec2.StartInstancesOutput, error) }
type Fargate ¶
type Fargate struct {
// contains filtered or unexported fields
}
func NewFargate ¶
func (Fargate) Sleep ¶
func (e Fargate) Sleep(args ResourceClientArgs) (ResourcesState, error)
func (Fargate) WakeUp ¶
func (e Fargate) WakeUp(args ResourceClientArgs) (ResourcesState, error)
type FargateTypeClient ¶
type FargateTypeClient interface {
UpdateService(ctx context.Context, params *ecs.UpdateServiceInput, optFns ...func(*ecs.Options)) (*ecs.UpdateServiceOutput, error)
}
type MessageBus ¶
type RDS ¶
type RDS struct {
// contains filtered or unexported fields
}
func (*RDS) Sleep ¶
func (r *RDS) Sleep(args ResourceClientArgs) (ResourcesState, error)
func (*RDS) WakeUp ¶
func (r *RDS) WakeUp(args ResourceClientArgs) (ResourcesState, error)
type RDSTypeClient ¶
type RDSTypeClient interface { StopDBInstance(ctx context.Context, params *rds.StopDBInstanceInput, optFns ...func(*rds.Options)) (*rds.StopDBInstanceOutput, error) StartDBInstance(ctx context.Context, params *rds.StartDBInstanceInput, optFns ...func(*rds.Options)) (*rds.StartDBInstanceOutput, error) }
type ResourceClientArgs ¶
type ResourceClientArgs struct { Identifiers []string ResourcesState *ResourcesState }
type ResourceClientsFactory ¶
type ResourceClientsFactory map[string]ResourcesClient
func NewResourceClientsFactory ¶
func NewResourceClientsFactory() (ResourceClientsFactory, error)
type ResourceState ¶
type ResourcesClient ¶
type ResourcesClient interface { Sleep(args ResourceClientArgs) (ResourcesState, error) WakeUp(args ResourceClientArgs) (ResourcesState, error) }
type ResourcesState ¶
type ResourcesState map[string]ResourceState
type SSM ¶
type SSM struct {
// contains filtered or unexported fields
}
func (SSM) GetConfig ¶
func (s SSM) GetConfig() (*SchedulerConfig, error)
type SSMTypeClient ¶
type SSMTypeClient interface {
GetParameter(ctx context.Context, params *ssm.GetParameterInput, optFns ...func(*ssm.Options)) (*ssm.GetParameterOutput, error)
}
type SchedulerConfig ¶
type SchedulerConfigClient ¶
type SchedulerConfigClient struct { Config *SchedulerConfig `json:"config"` // contains filtered or unexported fields }
func NewSchedulerConfigClient ¶
func NewSchedulerConfigClient(config *SchedulerConfig) *SchedulerConfigClient
func (SchedulerConfigClient) ShouldSendReport ¶
func (s SchedulerConfigClient) ShouldSendReport() (bool, error)
func (SchedulerConfigClient) ShouldWakeup ¶
func (s SchedulerConfigClient) ShouldWakeup() (bool, error)
type SchedulerService ¶
type SchedulerService struct { Config *SchedulerConfig SchedulerConfigClient *SchedulerConfigClient Factory ResourceClientsFactory MessageBus MessageBus }
func (SchedulerService) Execute ¶
func (s SchedulerService) Execute() (ResourcesState, error)
Click to show internal directories.
Click to hide internal directories.