Documentation ¶
Index ¶
- func ClusterID() *string
- func CreateTaskRevision(request requests.CreateFunctionRequest, config *types.DeployHandlerConfig) (*ecs.RegisterTaskDefinitionOutput, error)
- func DeleteECSService(serviceName string, cfg *types.DeployHandlerConfig) error
- func DeleteTaskRevision(functionName string) error
- func FindECSServiceArn(serviceName string) (*string, error)
- func GetLatestTaskRevision(functionName string) (string, error)
- func GetServiceList() ([]requests.Function, error)
- func IsFaasService(arn *string) bool
- func KeyValuePairGetValue(name string, values []*ecs.KeyValuePair) (*string, bool)
- func ServiceNameForDisplay(name *string) string
- func ServiceNameFromArn(arn *string) *string
- func ServiceNameFromFunctionName(functionName string) string
- func UpdateECSServiceDesiredCount(serviceName string, desiredCount int) (*ecs.Service, error)
- func UpdateOrCreateECSService(taskDefinition *ecs.TaskDefinition, request requests.CreateFunctionRequest, ...) (*ecs.Service, error)
- func VpcFromSubnet(subnets string) string
- type PolicyBuilder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTaskRevision ¶
func CreateTaskRevision( request requests.CreateFunctionRequest, config *types.DeployHandlerConfig) (*ecs.RegisterTaskDefinitionOutput, error)
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
DeleteTaskRevision deletes the task revision
func FindECSServiceArn ¶
FindECSServiceArn based on the serviceName finds a matching service, returning it's arn.
func GetLatestTaskRevision ¶ added in v0.1.0
GetLatestTaskRevision gets the latest task revision for the corresponding functionName
func GetServiceList ¶ added in v0.1.0
GetServiceList returns the list of OpenFaas functions running
func IsFaasService ¶
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 ¶
ServiceNameForDisplay returns the service name shown to the user
func ServiceNameFromArn ¶
ServiceNameFromArn calculated the service name from the service arn
func ServiceNameFromFunctionName ¶
ServiceNameFromFunctionName returns the aws faargate service name based on the OpenFaaS function name
func UpdateECSServiceDesiredCount ¶
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 ¶
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