awsprovider

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagKeyFleetManagerID = "superplane_fleet_manager_id"
	TagKeyFleetID        = "superplane_fleet_id"
	TagKeyRunnerID       = "superplane_runner_id"
	TagKeyRunnerVersion  = "superplane_runner_version"
	TagKeyArchitecture   = "superplane_runner_arch"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	FleetManagerID       string
	AMI                  string
	InstanceType         string
	Architecture         string
	SubnetIDs            []string
	SecurityGroupIDs     []string
	IAMInstanceProfile   string
	KeyName              string
	VolumeSizeGB         int32
	VolumeIOPS           int32
	VolumeThroughputMBps int32
	ResourceTags         map[string]string
	CloudWatchRegion     string
	CloudWatchLogGroup   string
}

type EC2API

type EC2API interface {
	DescribeInstances(
		context.Context,
		*ec2.DescribeInstancesInput,
		...func(*ec2.Options),
	) (*ec2.DescribeInstancesOutput, error)
	RunInstances(
		context.Context,
		*ec2.RunInstancesInput,
		...func(*ec2.Options),
	) (*ec2.RunInstancesOutput, error)
	TerminateInstances(
		context.Context,
		*ec2.TerminateInstancesInput,
		...func(*ec2.Options),
	) (*ec2.TerminateInstancesOutput, error)
}

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func New

func New(client EC2API, config Config, log *slog.Logger) (*Provider, error)

func (*Provider) BuildBootstrap

func (p *Provider) BuildBootstrap(request provider.RunnerBootstrap) ([]byte, error)

func (*Provider) Create

func (p *Provider) Create(
	ctx context.Context,
	request provider.CreateRequest,
) (provider.Resource, error)

func (*Provider) Delete

func (p *Provider) Delete(ctx context.Context, resource provider.Resource) error

func (*Provider) List

func (p *Provider) List(ctx context.Context, fleetID string) ([]provider.Resource, error)

func (*Provider) Name

func (p *Provider) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL