attachment

package
v0.0.0-...-1133dd9 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachment

type Attachment interface {
	GetAttachmentARN() string
	GetAttachmentStatus() AttachmentStatus
	GetAttachmentType() string
	HasExpired() bool
	IsSent() bool
	SetAttachedStatus()
	SetSentStatus()
	ShouldAttach() bool
	ShouldNotify() bool
	StartTimer(func()) error
	StopAckTimer()
	String() string
}

type AttachmentInfo

type AttachmentInfo struct {
	// TaskARN is the task identifier from ecs
	TaskARN string `json:"taskArn"`
	// AttachmentARN is the identifier for the attachment
	AttachmentARN string `json:"attachmentArn"`
	// Status is the status of the attachment: none/attached/detached
	Status AttachmentStatus `json:"status"`
	// ExpiresAt is the timestamp past which the attachment is considered
	// unsuccessful. The SubmitTaskStateChange API, with the attachment information
	// should be invoked before this timestamp.
	ExpiresAt time.Time `json:"expiresAt"`
	// AttachStatusSent indicates whether the attached status has been sent to backend
	AttachStatusSent bool `json:"attachSent,omitempty"`
	// TaskClusterARN is the identifier for the cluster which the task resides in
	TaskClusterARN string `json:"taskClusterArn,omitempty"`
	// ClusterARN is the identifier for the cluster which the container instance is registered to
	ClusterARN string `json:"clusterArn,omitempty"`
	// ContainerInstanceARN is the identifier for the container instance
	ContainerInstanceARN string `json:"containerInstanceArn,omitempty"`
}

type AttachmentStatus

type AttachmentStatus int32

AttachmentStatus is an enumeration type for attachment state

const (
	// AttachmentNone is zero state of a task when received attach message from acs
	AttachmentNone AttachmentStatus = iota
	// AttachmentAttached represents that an attachment has shown on the host
	AttachmentAttached
	// AttachmentDetached represents that an attachment has been actually detached from the host
	AttachmentDetached
)

func (*AttachmentStatus) ShouldSend

func (attachStatus *AttachmentStatus) ShouldSend() bool

ShouldSend returns whether the status should be sent to backend

func (*AttachmentStatus) String

func (attachStatus *AttachmentStatus) String() string

String return the string value of the attachment status

Directories

Path Synopsis
mocks
Package mock_resource is a generated GoMock package.
Package mock_resource is a generated GoMock package.

Jump to

Keyboard shortcuts

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