Documentation ¶
Index ¶
- func NewAwsApis(region, accessKey, secretKey string) (Ec2API, StsAPI, IamAPI, error)
- func UserData(region string, pubKeys []string, volumes []types.ExecVolume) (string, error)
- type Ec2API
- type EndpointDriver
- type ExecDriver
- func (d *ExecDriver) ExecConnectionInfo(ctx context.Context, execID string) (types.ConnectionInfo, error)
- func (d *ExecDriver) ExecCreate(ctx context.Context, project string, image string, spec types.HardwareSpec, ...) (string, error)
- func (d *ExecDriver) ExecDriverName() string
- func (d *ExecDriver) ExecGetStatus(ctx context.Context, execID string) (types.Status, error)
- func (d *ExecDriver) ExecPing(ctx context.Context, _ *string) error
- func (d *ExecDriver) ExecProvider() types.Provider
- func (d *ExecDriver) ExecSpec(_ context.Context, _ string) (types.HardwareSpec, error)
- func (d *ExecDriver) ExecStats(_ context.Context, _ string) (execsrv.Stats, error)
- func (d *ExecDriver) ExecTerminate(ctx context.Context, execID string) error
- type IamAPI
- type ProviderDriver
- type StsAPI
- type VolumeDriver
- func (v *VolumeDriver) VolumeCreate(ctx context.Context, projectID, name string, size int) (string, error)
- func (v *VolumeDriver) VolumeDelete(ctx context.Context, id string) error
- func (v *VolumeDriver) VolumeDriver(_ context.Context) string
- func (v *VolumeDriver) VolumeProvider() types.Provider
- func (v *VolumeDriver) VolumeResize(ctx context.Context, id string, size int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAwsApis ¶
Types ¶
type Ec2API ¶
type Ec2API interface { RunInstances(ctx context.Context, params *ec2.RunInstancesInput, optFns ...func(*ec2.Options)) (*ec2.RunInstancesOutput, error) DescribeInstanceStatus(ctx context.Context, params *ec2.DescribeInstanceStatusInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceStatusOutput, error) DescribeInstances(ctx context.Context, params *ec2.DescribeInstancesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstancesOutput, error) DescribeInstanceTypes(ctx context.Context, params *ec2.DescribeInstanceTypesInput, optFns ...func(*ec2.Options)) (*ec2.DescribeInstanceTypesOutput, error) TerminateInstances(ctx context.Context, params *ec2.TerminateInstancesInput, optFns ...func(*ec2.Options)) (*ec2.TerminateInstancesOutput, error) CreateTags(ctx context.Context, params *ec2.CreateTagsInput, optFns ...func(*ec2.Options)) (*ec2.CreateTagsOutput, error) CreateVolume(ctx context.Context, params *ec2.CreateVolumeInput, optFns ...func(*ec2.Options)) (*ec2.CreateVolumeOutput, error) DeleteVolume(ctx context.Context, params *ec2.DeleteVolumeInput, optFns ...func(*ec2.Options)) (*ec2.DeleteVolumeOutput, error) ModifyVolume(ctx context.Context, params *ec2.ModifyVolumeInput, optFns ...func(*ec2.Options)) (*ec2.ModifyVolumeOutput, error) }
type EndpointDriver ¶
type EndpointDriver struct{}
func (*EndpointDriver) EndpointCreate ¶
func (*EndpointDriver) EndpointDriverName ¶
func (e *EndpointDriver) EndpointDriverName() string
func (*EndpointDriver) EndpointProvider ¶
func (e *EndpointDriver) EndpointProvider() types.Provider
type ExecDriver ¶
type ExecDriver struct {
// contains filtered or unexported fields
}
func NewExecDriverAPI ¶
func NewExecDriverAPI(region, userID string, ec2API Ec2API, stsAPI StsAPI, iamAPI IamAPI) *ExecDriver
func (*ExecDriver) ExecConnectionInfo ¶
func (d *ExecDriver) ExecConnectionInfo(ctx context.Context, execID string) (types.ConnectionInfo, error)
func (*ExecDriver) ExecCreate ¶
func (d *ExecDriver) ExecCreate( ctx context.Context, project string, image string, spec types.HardwareSpec, network types.ExecNetwork, volumes []types.ExecVolume, pubKeys []string, region *string, ) (string, error)
func (*ExecDriver) ExecDriverName ¶
func (d *ExecDriver) ExecDriverName() string
func (*ExecDriver) ExecGetStatus ¶
func (*ExecDriver) ExecPing ¶
func (d *ExecDriver) ExecPing(ctx context.Context, _ *string) error
ExecPing pings the driver availability on behalf of a user. This can be used to check if the driver is configured correctly and healthy.
func (*ExecDriver) ExecProvider ¶
func (d *ExecDriver) ExecProvider() types.Provider
func (*ExecDriver) ExecSpec ¶
func (d *ExecDriver) ExecSpec(_ context.Context, _ string) (types.HardwareSpec, error)
func (*ExecDriver) ExecTerminate ¶
func (d *ExecDriver) ExecTerminate(ctx context.Context, execID string) error
type IamAPI ¶
type IamAPI interface { CreatePolicy(ctx context.Context, params *iam.CreatePolicyInput, optFns ...func(*iam.Options)) (*iam.CreatePolicyOutput, error) CreateRole(ctx context.Context, params *iam.CreateRoleInput, optFns ...func(*iam.Options)) (*iam.CreateRoleOutput, error) GetInstanceProfile(ctx context.Context, params *iam.GetInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.GetInstanceProfileOutput, error) AttachRolePolicy(ctx context.Context, params *iam.AttachRolePolicyInput, optFns ...func(*iam.Options)) (*iam.AttachRolePolicyOutput, error) CreateInstanceProfile(ctx context.Context, params *iam.CreateInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.CreateInstanceProfileOutput, error) AddRoleToInstanceProfile(ctx context.Context, params *iam.AddRoleToInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.AddRoleToInstanceProfileOutput, error) }
type ProviderDriver ¶
type ProviderDriver struct {
// contains filtered or unexported fields
}
func NewProviderDriver ¶
func NewProviderDriver(supportedInstanceTypes []types.NodeType) *ProviderDriver
func NewProviderDriverDefault ¶
func NewProviderDriverDefault() *ProviderDriver
func (*ProviderDriver) Provider ¶
func (p *ProviderDriver) Provider() types.Provider
func (*ProviderDriver) ProviderListNodeTypes ¶
type StsAPI ¶
type StsAPI interface { GetCallerIdentity(ctx context.Context, params *sts.GetCallerIdentityInput, optFns ...func(*sts.Options)) (*sts.GetCallerIdentityOutput, error) }
type VolumeDriver ¶
type VolumeDriver struct {
// contains filtered or unexported fields
}
func NewVolumeDriverAPI ¶
func NewVolumeDriverAPI(region, userID string, ec2Api Ec2API) *VolumeDriver
func (*VolumeDriver) VolumeCreate ¶
func (*VolumeDriver) VolumeDelete ¶
func (v *VolumeDriver) VolumeDelete(ctx context.Context, id string) error
func (*VolumeDriver) VolumeDriver ¶
func (v *VolumeDriver) VolumeDriver(_ context.Context) string
func (*VolumeDriver) VolumeProvider ¶
func (v *VolumeDriver) VolumeProvider() types.Provider
func (*VolumeDriver) VolumeResize ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
internal
|
|
Click to show internal directories.
Click to hide internal directories.