Documentation ¶
Index ¶
- Constants
- func DeployLambdaFunction(functionName, zipfile string, arch lambdatypes.Architecture) (*string, error)
- func DescribeClusterServices(clusterName string) ([]types.Service, error)
- func DescribeClusterTasks(clusterName, serviceName *string) ([]types.Task, error)
- func ExecuteCommand(taskArn, containerName, clusterArn string) (*ecs.ExecuteCommandOutput, error)
- func FetchCloudwatchLogs(logGroupName, logStreamName string, nextForwardToken *string, ...) (outputList [][]awscloudwatchlogstypes.OutputLogEvent, nextToken *string, ...)
- func FetchCpuAndMemoryUsage(serviceName, clusterName string) (memoryUtilized uint32, memoryReserved uint32, cpuUtilized uint32, ...)
- func FetchLogStreams(logGroupName string, container, taskArn *string) ([]awscloudwatchlogstypes.LogStream, error)
- func FetchTailLogsChannel(logGroupArn string) (*cloudwatchlogs.StartLiveTailEventStream, error)
- func GetAccountInformation() (*string, *string, error)
- func GetFunctionDescription(functionName string) (*string, error)
- func GetLambdaFunction(functionName string) (*lambda.GetFunctionOutput, error)
- func GetTaskDefinitions(taskDefinitionArns []string) ([]types.TaskDefinition, error)
- func ListECSClusters() ([]types.Cluster, error)
- func ListLambdaFunctions() ([]lambdatypes.FunctionConfiguration, error)
- func RestartECSService(clusterName, name string) error
- func ShortenTaskDefArn(taskDefinitionArn *string) string
- func TagLambdaFunctionWithVersion(functionName, version string) error
- func UpdateECSImage(version, serviceName, clusterName string) error
- func UpdateLambdaFunctionDescription(functionName, newDescription string) error
- type ApiGateway
- type ApiType
- type LogItem
- type Package
- type Version
Constants ¶
const S3_BUCKET_VAR_NAME = "S3_DEPLOYMENT_BUCKET_NAME"
Variables ¶
This section is empty.
Functions ¶
func DeployLambdaFunction ¶
func DeployLambdaFunction(functionName, zipfile string, arch lambdatypes.Architecture) (*string, error)
DeployLambdaFunction lets you update the function code for a specified lambda function by setting the code to execute point to a zip file in a lambda bucket. Arch must match the architecture the code is compiled for
func DescribeClusterServices ¶
DescribeClusterServices return a slice of the service descriptions found in the given ECS cluster
func DescribeClusterTasks ¶
DescribeClusterTasks lists all tasks in a cluster or service (if serivceName != nil) and returns a slice of the tasks found
func ExecuteCommand ¶
func ExecuteCommand(taskArn, containerName, clusterArn string) (*ecs.ExecuteCommandOutput, error)
ExecuteCommand executes /bin/sh command in an ECS container and returns the output
func FetchCloudwatchLogs ¶
func FetchCloudwatchLogs(logGroupName, logStreamName string, nextForwardToken *string, interval time.Duration) (outputList [][]awscloudwatchlogstypes.OutputLogEvent, nextToken *string, err error)
FetchCloudwatchLogs fetches log records from cloudwatch. If a nextForwardToken is provided, it will be used to in the query to cloudwatch, if not, it starts from scratch
func FetchCpuAndMemoryUsage ¶
func FetchCpuAndMemoryUsage(serviceName, clusterName string) (memoryUtilized uint32, memoryReserved uint32, cpuUtilized uint32, cpuReserved uint32, err error)
FetchCpuAndMemoryUsage reads memory and cpu usage from cloudwatch metrics for a given ECS service. Service and cluster name must be provided.
func FetchLogStreams ¶
func FetchLogStreams(logGroupName string, container, taskArn *string) ([]awscloudwatchlogstypes.LogStream, error)
FetchLogStreams fetches log streams for a given log group. If container and taskArn is provided, it is used to filter the returned result.
func FetchTailLogsChannel ¶
func FetchTailLogsChannel(logGroupArn string) (*cloudwatchlogs.StartLiveTailEventStream, error)
func GetAccountInformation ¶
GetAccountInformation returns information about the logged in account
func GetFunctionDescription ¶
GetFunctionDescription reads the lambda function description for the specified function and returns it
func GetLambdaFunction ¶
func GetLambdaFunction(functionName string) (*lambda.GetFunctionOutput, error)
func GetTaskDefinitions ¶
func GetTaskDefinitions(taskDefinitionArns []string) ([]types.TaskDefinition, error)
GetTaskDefinitions returns a slice of the task definitions in the given ECS tasks identified by Task definition arns
func ListECSClusters ¶
ListECSClusters returns a slice of all ECS clusters found in the account
func ListLambdaFunctions ¶
func ListLambdaFunctions() ([]lambdatypes.FunctionConfiguration, error)
ListLambdaFunctions lists all lambda functions the account and returns them as a slice of FunctionConfigurations
func RestartECSService ¶
RestartECSService restarts an ECS service by using updateing the service and setting the ForceNewDeployment flag, but not changing anything else. This effectively forces the ECS service to restart.
func ShortenTaskDefArn ¶
ShortTaskDefArn returns a short version of the task definition arn
func TagLambdaFunctionWithVersion ¶
TagLambdaFunctionWithVersion adds LastDeployed tag to a lambda function
func UpdateECSImage ¶ added in v0.0.2
func UpdateLambdaFunctionDescription ¶
UpdateLambdaFunctionDescription updates the lambda function description to the specified string. This is commonly used to force a cold start and makes the lambda function "restart"
Types ¶
type ApiGateway ¶
type LogItem ¶
type LogItem struct { Updated time.Time `json:"updated,omitempty"` User string `json:"user,omitempty"` Version string `json:"version,omitempty"` }
Logitem, describing who installed which version
type Package ¶ added in v0.0.2
type Package struct { Sha string Image string Created time.Time RegistryID string RepositoryName string }
func FetchPackagesFromECR ¶ added in v0.0.2
type Version ¶
Struct describing a version
func FetchAvailableVersions ¶
FetchAvailableVersions reads all files in the s3 bucket and returns the name and created timestamp. The Message field is not filled