github.com/wallyworld/juju@v0.0.0-20161013125918-6cf1bc9d917a/watcher/machinestorageids.go (about)

     1  // Copyright 2015 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package watcher
     5  
     6  // MachineStorageId associates a machine entity with a storage entity. They're
     7  // expressed as tags because they arrived here as a move, not a change; ideally
     8  // a MachineStorageIdsWatcher would return them in a more model-appropriate
     9  // format (i.e. not as strings-that-probably-parse-to-tags).
    10  type MachineStorageId struct {
    11  	MachineTag    string
    12  	AttachmentTag string
    13  }
    14  
    15  // MachineStorageIdsChannel is a change channel as described in the CoreWatcher
    16  // docs.
    17  //
    18  // It reports additions and removals to a set of attachments; and lifecycle
    19  // changes within the active set.
    20  type MachineStorageIdsChannel <-chan []MachineStorageId
    21  
    22  // MachineStorageIdsWatcher conveniently ties a MachineStorageIdsChannel to the
    23  // worker.Worker that represents its validity.
    24  type MachineStorageIdsWatcher interface {
    25  	CoreWatcher
    26  	Changes() MachineStorageIdsChannel
    27  }