Documentation ¶
Index ¶
- Constants
- func FixupFargateConfig(vCpu, memoryMiB float64) (cpu CpuUnits, memory MemoryMiB)
- func GetCDLogStreamForTaskID(taskID string) string
- func GetLogStreamForTaskID(awslogsStreamPrefix, containerName, taskID string) string
- func GetTaskID(taskArn TaskArn) string
- func GetTaskStatus(ctx context.Context, taskArn TaskArn) error
- func PlatformToArchOS(platform string) (string, string)
- func Query(ctx context.Context, input LogGroupInput, start, end time.Time, ...) error
- func SplitClusterTask(taskArn TaskArn) (string, string)
- func WaitForTask(ctx context.Context, taskArn TaskArn, poll time.Duration) error
- type AwsEcs
- func (a *AwsEcs) CreateUploadURL(ctx context.Context, name string) (string, error)
- func (a *AwsEcs) GetTaskArn(taskID string) (TaskArn, error)
- func (a *AwsEcs) GetVpcID() string
- func (a AwsEcs) Info(ctx context.Context, id TaskArn) (*types.TaskInfo, error)
- func (a *AwsEcs) MakeARN(service, resource string) string
- func (a *AwsEcs) PopulateVPCandSubnetID(ctx context.Context, vpcID, subnetID string) error
- func (a *AwsEcs) Run(ctx context.Context, env map[string]string, cmd ...string) (TaskArn, error)
- func (a AwsEcs) Stop(ctx context.Context, id types.TaskID) error
- func (a *AwsEcs) Tail(ctx context.Context, taskArn TaskArn) error
- func (a *AwsEcs) TailTaskID(ctx context.Context, taskID string) (EventStream, error)
- type Cache
- type CpuUnits
- type DeploymentStateChangeEvent
- type ECSDeploymentStateChange
- type ECSServiceAction
- type ECSTaskStateChange
- type Event
- type EventStream
- type KanikoTaskStateChangeEvent
- type LocalCache
- type LogEvent
- type LogGroupInput
- type LogStreamInfo
- type MemoryMiB
- type ServiceActionEvent
- type TaskArn
- type TaskFailure
- type TaskStateChangeEvent
Constants ¶
View Source
const ( CdContainerName = "main" DockerRegistry = "docker.io" EcrPublicRegistry = "public.ecr.aws" CrunProjectName = types.ProjectName )
View Source
const AwsLogsStreamPrefix = CrunProjectName
Variables ¶
This section is empty.
Functions ¶
func FixupFargateConfig ¶
func GetCDLogStreamForTaskID ¶
func GetLogStreamForTaskID ¶
func PlatformToArchOS ¶
func SplitClusterTask ¶
Types ¶
type AwsEcs ¶
type AwsEcs struct { aws.Aws BucketName string ClusterName string LogGroupARN string SecurityGroupID string Spot bool SubNetID string TaskDefARN string VpcID string }
func (*AwsEcs) CreateUploadURL ¶
func (*AwsEcs) PopulateVPCandSubnetID ¶
func (*AwsEcs) TailTaskID ¶
type DeploymentStateChangeEvent ¶
type DeploymentStateChangeEvent struct { Detail ECSDeploymentStateChange // contains filtered or unexported fields }
func (*DeploymentStateChangeEvent) Etag ¶
func (e *DeploymentStateChangeEvent) Etag() string
func (*DeploymentStateChangeEvent) Host ¶
func (e *DeploymentStateChangeEvent) Host() string
func (*DeploymentStateChangeEvent) Service ¶
func (e *DeploymentStateChangeEvent) Service() string
func (*DeploymentStateChangeEvent) State ¶
func (e *DeploymentStateChangeEvent) State() defangv1.ServiceState
func (*DeploymentStateChangeEvent) Status ¶
func (e *DeploymentStateChangeEvent) Status() string
type ECSDeploymentStateChange ¶
type ECSDeploymentStateChange struct { ECSServiceAction DeploymentId string `json:"deploymentId,omitempty"` }
type ECSServiceAction ¶
type ECSServiceAction = ecsserviceaction.ECSServiceAction
type ECSTaskStateChange ¶
type ECSTaskStateChange = ecstaskstatechange.ECSTaskStateChange
type Event ¶
type Event interface { Service() string Etag() string Host() string Status() string State() defangv1.ServiceState }
func ParseECSEvent ¶
type EventStream ¶
type EventStream interface { Close() error Events() <-chan types.StartLiveTailResponseStream Err() error }
EventStream is an interface that represents a stream of events from a call to StartLiveTail
func TailLogGroup ¶
func TailLogGroup(ctx context.Context, input LogGroupInput) (EventStream, error)
func TailLogGroups ¶
func TailLogGroups(ctx context.Context, since time.Time, logGroups ...LogGroupInput) (EventStream, error)
type KanikoTaskStateChangeEvent ¶
type KanikoTaskStateChangeEvent TaskStateChangeEvent
func (*KanikoTaskStateChangeEvent) Etag ¶
func (e *KanikoTaskStateChangeEvent) Etag() string
func (*KanikoTaskStateChangeEvent) Host ¶
func (e *KanikoTaskStateChangeEvent) Host() string
func (*KanikoTaskStateChangeEvent) Service ¶
func (e *KanikoTaskStateChangeEvent) Service() string
func (*KanikoTaskStateChangeEvent) State ¶
func (e *KanikoTaskStateChangeEvent) State() defangv1.ServiceState
func (*KanikoTaskStateChangeEvent) Status ¶
func (e *KanikoTaskStateChangeEvent) Status() string
type LocalCache ¶
func (LocalCache) Get ¶
func (c LocalCache) Get(k string) string
func (LocalCache) Set ¶
func (c LocalCache) Set(k, v string)
type LogEvent ¶
type LogEvent = types.LiveTailSessionLogEvent
func GetLogEvents ¶
func GetLogEvents(e types.StartLiveTailResponseStream) ([]LogEvent, error)
type LogGroupInput ¶
type LogGroupInput struct { LogGroupARN string LogStreamNames []string LogStreamNamePrefix string LogEventFilterPattern string }
LogGroupInput is like cloudwatchlogs.StartLiveTailInput but with only one loggroup and one logstream prefix.
type LogStreamInfo ¶
func GetLogStreamInfo ¶
func GetLogStreamInfo(logStream string) *LogStreamInfo
type ServiceActionEvent ¶
type ServiceActionEvent struct { Detail ECSServiceAction // contains filtered or unexported fields }
func (*ServiceActionEvent) Etag ¶
func (e *ServiceActionEvent) Etag() string
func (*ServiceActionEvent) Host ¶
func (e *ServiceActionEvent) Host() string
func (*ServiceActionEvent) Service ¶
func (e *ServiceActionEvent) Service() string
func (*ServiceActionEvent) State ¶
func (e *ServiceActionEvent) State() defangv1.ServiceState
func (*ServiceActionEvent) Status ¶
func (e *ServiceActionEvent) Status() string
type TaskFailure ¶
type TaskFailure struct { Reason types.TaskStopCode Detail string }
func (TaskFailure) Error ¶
func (t TaskFailure) Error() string
type TaskStateChangeEvent ¶
type TaskStateChangeEvent struct { Detail ECSTaskStateChange // contains filtered or unexported fields }
func (*TaskStateChangeEvent) Etag ¶
func (e *TaskStateChangeEvent) Etag() string
func (*TaskStateChangeEvent) Host ¶
func (e *TaskStateChangeEvent) Host() string
func (*TaskStateChangeEvent) Service ¶
func (e *TaskStateChangeEvent) Service() string
func (*TaskStateChangeEvent) State ¶
func (e *TaskStateChangeEvent) State() defangv1.ServiceState
func (*TaskStateChangeEvent) Status ¶
func (e *TaskStateChangeEvent) Status() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.