Add sample config file and instructions

This commit is contained in:
Onur Filiz
2018-03-23 17:09:16 -07:00
committed by Robbie Zhang
parent 29d2c6295d
commit 20ceae03f7
3 changed files with 112 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
package fargate
import (
"strings"
)
// Regions is the set of AWS regions where a service is available.
// https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/
type Regions []string
var (
// FargateRegions are AWS regions where Fargate is available.
FargateRegions = Regions{
"us-east-1",
}
)
// Include returns whether the region set includes the given region.
func (r Regions) Include(region string) bool {
region = strings.ToLower(region)
region = strings.Trim(region, " ")
for _, name := range r {
if name == region {
return true
}
}
return false
}
// Names returns an array of region names.
func (r Regions) Names() []string {
names := make([]string, 0, len(r))
for _, name := range r {
names = append(names, name)
}
return names
}