Documentation ¶
Index ¶
- func Load(reader io.Reader, topo *topology.Topology, nw network.Network) (map[string]File, error)
- type File
- type FileContainer
- func (fc FileContainer) Add(id string, data topology.Data)
- func (fc FileContainer) Find(id string) topology.Data
- func (fc FileContainer) Has(id string) bool
- func (fc *FileContainer) Init(id string)
- func (fc FileContainer) Pop(id string) topology.Data
- func (fc *FileContainer) SetDatabase(db topology.Database)
- func (fc *FileContainer) SetNetwork(nw network.Network)
- func (fc FileContainer) Transfer(when uint64, fileId string, data topology.Data, ...) []event.Event
- type SimpleFileDatabase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
type FileContainer ¶
type FileContainer struct {
// contains filtered or unexported fields
}
FileContainer implements the Container interface from the topology module
func (FileContainer) Has ¶
func (fc FileContainer) Has(id string) bool
func (*FileContainer) SetDatabase ¶
func (fc *FileContainer) SetDatabase(db topology.Database)
FileContainer setters for data members
func (*FileContainer) SetNetwork ¶
func (fc *FileContainer) SetNetwork(nw network.Network)
type SimpleFileDatabase ¶
SimpleFileDatabase implements Database of datacenter locations given a fileId.
func InitSimpleFileDatabase ¶
func InitSimpleFileDatabase() SimpleFileDatabase
Constructor using builtin make()
func (SimpleFileDatabase) Location ¶
func (db SimpleFileDatabase) Location(fileId string) []string
Access array of locations for a given file.
func (SimpleFileDatabase) Record ¶
func (db SimpleFileDatabase) Record(fileId, locationId string)
Records a file's datacenter location into SimpleFileDatabase If the fileId does not correspond to an already recorded file, a new entry will be created for it
Click to show internal directories.
Click to hide internal directories.