aws

package
v0.0.0-...-b659250 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2016 License: Apache-2.0, Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CustomTopic  = os.Getenv("CUSTOM_TOPIC")
	SortableTime = "20060102.150405.000000000"
	ValidAppName = regexp.MustCompile(`\A[a-zA-Z][-a-zA-Z0-9]{3,29}\z`)
)
View Source
var (
	IndexOperationConcurrency = 128
)

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func DashName

func DashName(name string) string

func RestoreAsset

func RestoreAsset(dir, name string) error

Restore an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

Restore assets under the given directory recursively

func UpperName

func UpperName(name string) string

Types

type AWSProvider

type AWSProvider struct {
	Region   string
	Access   string
	Secret   string
	Endpoint string
}

func NewProvider

func NewProvider(region, access, secret, endpoint string) (*AWSProvider, error)

func (*AWSProvider) AppGet

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

func (*AWSProvider) BuildCopy

func (p *AWSProvider) BuildCopy(srcApp, id, destApp string) (*structs.Build, error)

func (*AWSProvider) BuildCreateIndex

func (p *AWSProvider) BuildCreateIndex(app string, index structs.Index, manifest, description string, cache bool) (*structs.Build, error)

func (*AWSProvider) BuildCreateRepo

func (p *AWSProvider) BuildCreateRepo(app, url, manifest, description string, cache bool) (*structs.Build, error)

func (*AWSProvider) BuildCreateTar

func (p *AWSProvider) BuildCreateTar(app string, src io.Reader, manifest, description string, cache bool) (*structs.Build, error)

func (*AWSProvider) BuildDelete

func (p *AWSProvider) BuildDelete(app, id string) (*structs.Build, error)

func (*AWSProvider) BuildGet

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

func (*AWSProvider) BuildList

func (p *AWSProvider) BuildList(app string) (structs.Builds, error)

func (*AWSProvider) BuildRelease

func (p *AWSProvider) BuildRelease(b *structs.Build) (*structs.Release, error)

func (*AWSProvider) BuildSave

func (p *AWSProvider) BuildSave(b *structs.Build) error

BuildSave creates or updates a build item in DynamoDB. It takes an optional bucket argument, which if set indicates to PUT Log data into S3

func (*AWSProvider) CapacityGet

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

returns individual server memory, total rack memory

func (*AWSProvider) CertificateCreate

func (p *AWSProvider) CertificateCreate(pub, key, chain string) (*structs.Certificate, error)

func (*AWSProvider) CertificateDelete

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

func (*AWSProvider) CertificateGenerate

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

func (*AWSProvider) CertificateList

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

func (*AWSProvider) EventSend

func (p *AWSProvider) EventSend(e *structs.Event, err error) error

EventSend publishes an important message out to the world.

On AWS messages are published to SNS. The Rack has an HTTP endpoint that is an SNS subscription, and when a message is delivered forwards them to all configured webhook services.

Often the Rack has a Console webhook which facilitates forwarding events to Slack with additional formatting and filtering.

Because these are important system events, they are also published to Segment for operational metrics.

func (*AWSProvider) IndexDiff

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

func (*AWSProvider) IndexDownload

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

func (*AWSProvider) IndexUpload

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

func (*AWSProvider) InstanceList

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

func (*AWSProvider) LogStream

func (p *AWSProvider) LogStream(app string, w io.Writer, opts structs.LogStreamOptions) error

func (*AWSProvider) ReleaseDelete

func (p *AWSProvider) ReleaseDelete(app, id string) (*structs.Release, error)

func (*AWSProvider) ReleaseGet

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

func (*AWSProvider) ReleaseList

func (p *AWSProvider) ReleaseList(app string) (structs.Releases, error)

func (*AWSProvider) ReleasePromote

func (p *AWSProvider) ReleasePromote(app, id string) (*structs.Release, error)

func (*AWSProvider) ReleaseSave

func (p *AWSProvider) ReleaseSave(r *structs.Release, bucket, key string) error

func (*AWSProvider) ServiceCreate

func (p *AWSProvider) ServiceCreate(name, kind string, params map[string]string) (*structs.Service, error)

func (*AWSProvider) ServiceDelete

func (p *AWSProvider) ServiceDelete(name string) (*structs.Service, error)

func (*AWSProvider) ServiceGet

func (p *AWSProvider) ServiceGet(name string) (*structs.Service, error)
func (p *AWSProvider) ServiceLink(name, app, process string) (*structs.Service, error)

func (*AWSProvider) ServiceLinkReplace

func (p *AWSProvider) ServiceLinkReplace(a *structs.App, s *structs.Service) error

func (*AWSProvider) ServiceLinkSet

func (p *AWSProvider) ServiceLinkSet(a *structs.App, s *structs.Service) error

func (*AWSProvider) ServiceLinkSubscribe

func (p *AWSProvider) ServiceLinkSubscribe(a *structs.App, s *structs.Service) error
func (p *AWSProvider) ServiceUnlink(name, app, process string) (*structs.Service, error)

func (*AWSProvider) ServiceUnlinkReplace

func (p *AWSProvider) ServiceUnlinkReplace(a *structs.App, s *structs.Service) error

func (*AWSProvider) ServiceUnlinkSet

func (p *AWSProvider) ServiceUnlinkSet(a *structs.App, s *structs.Service) error

func (*AWSProvider) ServiceUnlinkSubscribe

func (p *AWSProvider) ServiceUnlinkSubscribe(a *structs.App, s *structs.Service) error

func (*AWSProvider) SystemGet

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

func (*AWSProvider) SystemSave

func (p *AWSProvider) SystemSave(system structs.System) error

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 ECSServices

type ECSServices []*ecs.Service

type Template

type Template struct {
	Parameters map[string]TemplateParameter
}

type TemplateParameter

type TemplateParameter struct {
	Default     string
	Description string
	Type        string
}

Jump to

Keyboard shortcuts

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