aws

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2018 License: MIT Imports: 22 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterID

func ClusterID() *string

ClusterID returns the configured cluster ID

func CreateTaskRevision

CreateTaskRevision create a new task revision

func DeleteECSService added in v0.1.0

func DeleteECSService(
	serviceName string,
	cfg *types.DeployHandlerConfig) error

DeleteECSService remove the service with the supplied name

func DeleteTaskRevision added in v0.1.0

func DeleteTaskRevision(functionName string) error

DeleteTaskRevision deletes the task revision

func FindECSServiceArn

func FindECSServiceArn(serviceName string) (*string, error)

FindECSServiceArn based on the serviceName finds a matching service, returning it's arn.

func GetLatestTaskRevision added in v0.1.0

func GetLatestTaskRevision(functionName string) (string, error)

GetLatestTaskRevision gets the latest task revision for the corresponding functionName

func GetServiceList added in v0.1.0

func GetServiceList() ([]requests.Function, error)

GetServiceList returns the list of OpenFaas functions running

func IsFaasService

func IsFaasService(arn *string) bool

IsFaasService returns true if the service is an OpenFaaS function

func KeyValuePairGetValue

func KeyValuePairGetValue(name string, values []*ecs.KeyValuePair) (*string, bool)

KeyValuePairGetValue searches the array of values and returns the matching name or nil if none are found.

func ServiceNameForDisplay

func ServiceNameForDisplay(name *string) string

ServiceNameForDisplay returns the service name shown to the user

func ServiceNameFromArn

func ServiceNameFromArn(arn *string) *string

ServiceNameFromArn calculated the service name from the service arn

func ServiceNameFromFunctionName

func ServiceNameFromFunctionName(functionName string) string

ServiceNameFromFunctionName returns the aws faargate service name based on the OpenFaaS function name

func UpdateECSServiceDesiredCount

func UpdateECSServiceDesiredCount(
	serviceName string,
	desiredCount int) (*ecs.Service, error)

UpdateECSServiceDesiredCount update the service desired count

func UpdateOrCreateECSService

func UpdateOrCreateECSService(
	taskDefinition *ecs.TaskDefinition,
	request requests.CreateFunctionRequest,
	cfg *types.DeployHandlerConfig) (*ecs.Service, error)

UpdateOrCreateECSService either creates an new service or updates an existing one if matched based on the service name in the request

func VpcFromSubnet

func VpcFromSubnet(subnets string) string

VpcFromSubnet calculates the vpc id based on the supplied subnet ids, or returns the default vpc id if subnets are an empty string

Types

type PolicyBuilder added in v0.1.0

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

PolicyBuilder is used to build IAM policies

func NewPolicyBuilder added in v0.1.0

func NewPolicyBuilder() *PolicyBuilder

NewPolicyBuilder create a new PolicyBuilder

func (*PolicyBuilder) AddStatement added in v0.1.0

func (p *PolicyBuilder) AddStatement(actions []string, resources []string)

AddStatement adds a statement with corresponding actions and resources

func (*PolicyBuilder) String added in v0.1.0

func (p *PolicyBuilder) String() string

Jump to

Keyboard shortcuts

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