Documentation ¶
Index ¶
- type EBSWatcher
- func (w *EBSWatcher) HandleEBSResourceAttachment(ebs *apiebs.ResourceAttachment) error
- func (w *EBSWatcher) HandleResourceAttachment(ebs *apiebs.ResourceAttachment)
- func (w *EBSWatcher) NotifyAttached(foundVolumes map[string]string) []error
- func (w *EBSWatcher) StageAll(foundVolumes map[string]string) []error
- func (w *EBSWatcher) Start()
- func (w *EBSWatcher) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EBSWatcher ¶
type EBSWatcher struct {
// contains filtered or unexported fields
}
func NewWatcher ¶
func NewWatcher(ctx context.Context, cfg *config.Config, state dockerstate.TaskEngineState, taskEngine ecsengine.TaskEngine, dockerClient dockerapi.DockerClient) *EBSWatcher
NewWatcher is used to return a new instance of the EBSWatcher struct
func (*EBSWatcher) HandleEBSResourceAttachment ¶
func (w *EBSWatcher) HandleEBSResourceAttachment(ebs *apiebs.ResourceAttachment) error
HandleResourceAttachment processes the resource attachment message. It will: 1. Check whether we already have this attachment in state and if so it's a noop. 2. Otherwise add the attachment to state, start its ack timer, and save to the agent state.
func (*EBSWatcher) HandleResourceAttachment ¶
func (w *EBSWatcher) HandleResourceAttachment(ebs *apiebs.ResourceAttachment)
func (*EBSWatcher) NotifyAttached ¶
func (w *EBSWatcher) NotifyAttached(foundVolumes map[string]string) []error
NotifyAttached will go through the list of found EBS volumes from the scanning process and mark them as found.
func (*EBSWatcher) StageAll ¶
func (w *EBSWatcher) StageAll(foundVolumes map[string]string) []error
assumes CSI Driver Managed Daemon is running else call will timeout
func (*EBSWatcher) Start ¶
func (w *EBSWatcher) Start()
Start is used to kick off the periodic scanning process of the EBS volume attachments for the EBS watcher. It will be start and continue to run whenever there's a pending EBS volume attachment that hasn't been found. If there aren't any, the scan ticker will not start up/scan for volumes.