aws

package
v0.0.0-...-8e3368f Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 79 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConvoxJwtSsmKeyName = "convox-jwt-key"
	ParameterNameTags   = "Tags"
)
View Source
const CONVOX_INSTANCE_MANAGED = "CONVOX_INSTANCE"
View Source
const StatusCodePrefix = "F1E49A85-0AD7-4AEF-A618-C249C6E6568D:"

StatusCodePrefix is sent to the client to let it know the exit code is coming next

Variables

View Source
var (
	IndexOperationConcurrency = 128
)
View Source
var Logger = logger.New("ns=provider.aws")

Logger is a package-wide logger

Functions

This section is empty.

Types

type CfsslCertificateBundle

type CfsslCertificateBundle struct {
	Bundle string `json:"bundle"`
}

type CfsslError

type CfsslError struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

func (CfsslError) Error

func (e CfsslError) Error() string

type CronJob

type CronJob struct {
	Name     string `yaml:"name"`
	Schedule string `yaml:"schedule"`
	Command  string `yaml:"command"`
	Service  *manifest1.Service
	App      *structs.App
}

func NewCronJobFromLabel

func NewCronJobFromLabel(key, value string) CronJob

func (*CronJob) AppName

func (cr *CronJob) AppName() string

func (*CronJob) LongName

func (cr *CronJob) LongName() string

func (*CronJob) Process

func (cr *CronJob) Process() string

func (*CronJob) ShortName

func (cr *CronJob) ShortName() string

type CronJobs

type CronJobs []CronJob

func (CronJobs) Len

func (a CronJobs) Len() int

func (CronJobs) Less

func (a CronJobs) Less(i, j int) bool

func (CronJobs) Swap

func (a CronJobs) Swap(i, j int)

type ECSServices

type ECSServices []*ecs.Service

type Formation

type Formation struct {
	Parameters map[string]FormationParameter
	Resources  map[string]FormationResource
}

type FormationParameter

type FormationParameter struct {
	Default     interface{}
	Description string
	NoEcho      bool
	Type        string
}

type FormationResource

type FormationResource struct {
	Type       string
	Properties map[string]interface{}
}

type Provider

type Provider struct {
	Region   string
	Endpoint string

	AsgSpot                           string
	AsgStandard                       string
	AvailabilityZones                 string
	BuildCluster                      string
	ClientId                          string
	CloudformationTopic               string
	Cluster                           string
	CustomEncryptionKey               string
	Development                       bool
	DynamoBuilds                      string
	DynamoReleases                    string
	DockerTLS                         *structs.TLSPemCertBytes
	EcsPollInterval                   int
	EncryptionKey                     string
	Fargate                           bool
	HighAvailability                  bool
	InstancesIpToIncludInWhiteListing string
	Internal                          bool
	InternalOnly                      bool
	ELBLogBucket                      string
	LogBucket                         string
	LogDriver                         string
	NotificationTopic                 string
	OnDemandMinCount                  int
	Password                          string
	Private                           bool
	PrivateBuild                      bool
	ApiBalancerSecurity               string
	Rack                              string
	RackApiServiceName                string
	SecurityGroup                     string
	SettingsBucket                    string
	SshKey                            string
	SpotInstances                     bool
	Subnets                           string
	SubnetsPrivate                    string
	StackId                           string
	SyslogDestination                 string
	SyslogFormat                      string
	Version                           string
	Vpc                               string
	VpcCidr                           string
	WhiteListSpecified                bool
	MaintainTimerState                bool
	Metrics                           *metrics.Metrics
	SkipCache                         bool

	CloudWatch cloudwatchiface.CloudWatchAPI
	// contains filtered or unexported fields
}

func FromEnv

func FromEnv() (*Provider, error)

NewProviderFromEnv returns a new AWS provider from env vars

func (*Provider) ApiError

func (p *Provider) ApiError(err error) error

func (*Provider) AppCancel

func (p *Provider) AppCancel(name string) error

func (*Provider) AppCreate

func (p *Provider) AppCreate(name string, opts structs.AppCreateOptions) (*structs.App, error)

func (*Provider) AppDelete

func (p *Provider) AppDelete(name string) error

AppDelete deletes an app

func (*Provider) AppGet

func (p *Provider) AppGet(name string) (*structs.App, error)

AppGet gets an app

func (*Provider) AppList

func (p *Provider) AppList() (structs.Apps, error)

func (*Provider) AppLogs

func (p *Provider) AppLogs(app string, opts structs.LogsOptions) (io.ReadCloser, error)

func (*Provider) AppMetrics

func (p *Provider) AppMetrics(name string, opts structs.MetricsOptions) (structs.Metrics, error)

func (*Provider) AppUpdate

func (p *Provider) AppUpdate(app string, opts structs.AppUpdateOptions) error

func (*Provider) BuildCreate

func (p *Provider) BuildCreate(app, url string, opts structs.BuildCreateOptions) (*structs.Build, error)

func (*Provider) BuildExport

func (p *Provider) BuildExport(app, id string, w io.Writer) error

BuildExport exports a build artifact

func (*Provider) BuildGet

func (p *Provider) BuildGet(app, id string) (*structs.Build, error)

func (*Provider) BuildImport

func (p *Provider) BuildImport(app string, r io.Reader) (*structs.Build, error)

BuildImport imports a build artifact

func (*Provider) BuildList

func (p *Provider) BuildList(app string, opts structs.BuildListOptions) (structs.Builds, error)

BuildList returns a list of the latest builds, with the length specified in limit

func (*Provider) BuildLogs

func (p *Provider) BuildLogs(app, id string, opts structs.LogsOptions) (io.ReadCloser, error)

BuildLogs streams the logs for a Build to an io.Writer

func (*Provider) BuildUpdate

func (p *Provider) BuildUpdate(app, id string, opts structs.BuildUpdateOptions) (*structs.Build, error)

func (*Provider) CapacityGet

func (p *Provider) CapacityGet() (*structs.Capacity, error)

CapacityGet returns individual server and total rack resources

func (*Provider) CertificateApply

func (p *Provider) CertificateApply(app, service string, port int, id string) error

func (*Provider) CertificateCreate

func (p *Provider) CertificateCreate(pub, key string, opts structs.CertificateCreateOptions) (*structs.Certificate, error)

func (*Provider) CertificateDelete

func (p *Provider) CertificateDelete(id string) error

func (*Provider) CertificateGenerate

func (p *Provider) CertificateGenerate(domains []string) (*structs.Certificate, error)

func (*Provider) CertificateList

func (p *Provider) CertificateList() (structs.Certificates, error)

func (*Provider) Context

func (p *Provider) Context() context.Context

func (*Provider) EventSend

func (p *Provider) EventSend(action string, opts structs.EventSendOptions) error

func (*Provider) FilesDelete

func (p *Provider) FilesDelete(app, pid string, files []string) error

func (*Provider) FilesDownload

func (p *Provider) FilesDownload(app, pid string, file string) (io.Reader, error)

func (*Provider) FilesUpload

func (p *Provider) FilesUpload(app, pid string, r io.Reader) error

func (*Provider) IndexDiff

func (p *Provider) IndexDiff(index *structs.Index) ([]string, error)

func (*Provider) IndexDownload

func (p *Provider) IndexDownload(index *structs.Index, dir string) error

func (*Provider) IndexUpload

func (p *Provider) IndexUpload(hash string, data []byte) error

func (*Provider) Initialize

func (p *Provider) Initialize(opts structs.ProviderOptions) error

func (*Provider) InstanceKeyroll

func (p *Provider) InstanceKeyroll() error

func (*Provider) InstanceList

func (p *Provider) InstanceList() (structs.Instances, error)

func (*Provider) InstanceShell

func (p *Provider) InstanceShell(id string, rw io.ReadWriter, opts structs.InstanceShellOptions) (int, error)

func (*Provider) InstanceTerminate

func (p *Provider) InstanceTerminate(id string) error

func (*Provider) IsTest

func (p *Provider) IsTest() bool

IsTest returns true when we're in test mode

func (*Provider) ObjectDelete

func (p *Provider) ObjectDelete(app, key string) error

func (*Provider) ObjectExists

func (p *Provider) ObjectExists(app, key string) (bool, error)

func (*Provider) ObjectFetch

func (p *Provider) ObjectFetch(app, key string) (io.ReadCloser, error)

ObjectFetch fetches an Object

func (*Provider) ObjectList

func (p *Provider) ObjectList(app, prefix string) ([]string, error)

func (*Provider) ObjectStore

func (p *Provider) ObjectStore(app, key string, r io.Reader, opts structs.ObjectStoreOptions) (*structs.Object, error)

ObjectStore stores an Object

func (*Provider) ProcessExec

func (p *Provider) ProcessExec(app, pid, command string, rw io.ReadWriter, opts structs.ProcessExecOptions) (int, error)

ProcessExec runs a command in an existing Process

func (*Provider) ProcessGet

func (p *Provider) ProcessGet(app, pid string) (*structs.Process, error)

ProcessGet returns the specified process for an app

func (*Provider) ProcessList

func (p *Provider) ProcessList(app string, opts structs.ProcessListOptions) (structs.Processes, error)

ProcessList returns a list of processes for an app

func (*Provider) ProcessLogs

func (p *Provider) ProcessLogs(app, pid string, opts structs.LogsOptions) (io.ReadCloser, error)

func (*Provider) ProcessRun

func (p *Provider) ProcessRun(app, service string, opts structs.ProcessRunOptions) (*structs.Process, error)

ProcessRun runs a new Process

func (*Provider) ProcessStop

func (p *Provider) ProcessStop(app, pid string) error

ProcessStop stops a Process

func (*Provider) ProcessWait

func (p *Provider) ProcessWait(app, pid string) (int, error)

func (*Provider) Proxy

func (p *Provider) Proxy(host string, port int, rw io.ReadWriter, opts structs.ProxyOptions) error

func (*Provider) RackParamsToSync

func (p *Provider) RackParamsToSync(release string, params map[string]string) map[string]string

func (*Provider) RegistryAdd

func (p *Provider) RegistryAdd(server, username, password string) (*structs.Registry, error)

func (*Provider) RegistryList

func (p *Provider) RegistryList() (structs.Registries, error)

func (*Provider) RegistryRemove

func (p *Provider) RegistryRemove(server string) error

func (*Provider) ReleaseCreate

func (p *Provider) ReleaseCreate(app string, opts structs.ReleaseCreateOptions) (*structs.Release, error)

func (*Provider) ReleaseGet

func (p *Provider) ReleaseGet(app, id string) (*structs.Release, error)

ReleaseGet returns a release

func (*Provider) ReleaseList

func (p *Provider) ReleaseList(app string, opts structs.ReleaseListOptions) (structs.Releases, error)

ReleaseList returns a list of the latest releases, with the length specified in limit

func (*Provider) ReleasePromote

func (p *Provider) ReleasePromote(app, id string, opts structs.ReleasePromoteOptions) error

ReleasePromote promotes a release

func (*Provider) ResourceDefaults

func (p *Provider) ResourceDefaults(app, resource string) (map[string]string, error)

func (*Provider) ResourceGet

func (p *Provider) ResourceGet(app, name string) (*structs.Resource, error)

func (*Provider) ResourceList

func (p *Provider) ResourceList(app string) (structs.Resources, error)

func (*Provider) ServiceList

func (p *Provider) ServiceList(app string) (structs.Services, error)

func (*Provider) ServiceMetrics

func (p *Provider) ServiceMetrics(app, name string, opts structs.MetricsOptions) (structs.Metrics, error)

func (*Provider) ServiceRestart

func (p *Provider) ServiceRestart(app, name string) error

func (*Provider) ServiceUpdate

func (p *Provider) ServiceUpdate(app, name string, opts structs.ServiceUpdateOptions) error

func (*Provider) SettingDelete

func (p *Provider) SettingDelete(name string) error

func (*Provider) SettingExists

func (p *Provider) SettingExists(name string) (bool, error)

func (*Provider) SettingGet

func (p *Provider) SettingGet(name string) (string, error)

func (*Provider) SettingList

func (p *Provider) SettingList(opts structs.SettingListOptions) ([]string, error)

func (*Provider) SettingPut

func (p *Provider) SettingPut(name, value string) error

func (*Provider) Sync

func (p *Provider) Sync(name string) error

func (*Provider) SyncInstancesIpInSecurityGroup

func (p *Provider) SyncInstancesIpInSecurityGroup() error

func (*Provider) SystemDecrypt

func (p *Provider) SystemDecrypt(data []byte) ([]byte, error)

func (*Provider) SystemEncrypt

func (p *Provider) SystemEncrypt(data []byte) ([]byte, error)

func (*Provider) SystemGet

func (p *Provider) SystemGet() (*structs.System, error)

func (*Provider) SystemInstall

func (p *Provider) SystemInstall(w io.Writer, opts structs.SystemInstallOptions) (string, error)

func (*Provider) SystemJwtSignKey

func (p *Provider) SystemJwtSignKey() (string, error)

func (*Provider) SystemJwtSignKeyRotate

func (p *Provider) SystemJwtSignKeyRotate() (string, error)

func (*Provider) SystemLogs

func (p *Provider) SystemLogs(opts structs.LogsOptions) (io.ReadCloser, error)

SystemLogs streams logs for the Rack

func (*Provider) SystemMetrics

func (p *Provider) SystemMetrics(opts structs.MetricsOptions) (structs.Metrics, error)

func (*Provider) SystemProcesses

func (p *Provider) SystemProcesses(opts structs.SystemProcessesOptions) (structs.Processes, error)

func (*Provider) SystemReleases

func (p *Provider) SystemReleases() (structs.Releases, error)

SystemReleases lists the latest releases of the rack

func (*Provider) SystemResourceCreate

func (p *Provider) SystemResourceCreate(kind string, opts structs.ResourceCreateOptions) (*structs.Resource, error)

ResourceCreate creates a new resource. Note: see also createResource() below.

func (*Provider) SystemResourceDelete

func (p *Provider) SystemResourceDelete(name string) error

ResourceDelete deletes a resource.

func (*Provider) SystemResourceGet

func (p *Provider) SystemResourceGet(name string) (*structs.Resource, error)

ResourceGet retrieves a resource.

func (p *Provider) SystemResourceLink(name, app string) (*structs.Resource, error)

ResourceLink creates a link between the provided app and resource.

func (*Provider) SystemResourceList

func (p *Provider) SystemResourceList() (structs.Resources, error)

ResourceList lists the resources.

func (*Provider) SystemResourceTypes

func (p *Provider) SystemResourceTypes() (structs.ResourceTypes, error)
func (p *Provider) SystemResourceUnlink(name, app string) (*structs.Resource, error)

ResourceUnlink removes a link between the provided app and resource.

func (*Provider) SystemResourceUpdate

func (p *Provider) SystemResourceUpdate(name string, opts structs.ResourceUpdateOptions) (*structs.Resource, error)

ResourceUpdate updates a resource with new params.

func (*Provider) SystemUninstall

func (p *Provider) SystemUninstall(name string, w io.Writer, opts structs.SystemUninstallOptions) error

func (*Provider) SystemUpdate

func (p *Provider) SystemUpdate(opts structs.SystemUpdateOptions) error

func (*Provider) WithContext

func (p *Provider) WithContext(ctx context.Context) structs.Provider

func (*Provider) Workers

func (p *Provider) Workers() error

Directories

Path Synopsis
lambda

Jump to

Keyboard shortcuts

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