file

package
v0.0.0-...-63237fd Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(reader io.Reader, topo *topology.Topology, nw network.Network) (map[string]File, error)

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func New

func New(id string, size uint64) File

func (File) Equal

func (f File) Equal(d topology.Data) bool

Comparison function for File using Id & Size

func (File) File_Location

func (f File) File_Location() []int

adaptive code

func (File) Id

func (f File) Id() string

File getters for data members

func (File) Size

func (f File) Size() uint64

type FileContainer

type FileContainer struct {
	// contains filtered or unexported fields
}

FileContainer implements the Container interface from the topology module

func (FileContainer) Add

func (fc FileContainer) Add(id string, data topology.Data)

func (FileContainer) Find

func (fc FileContainer) Find(id string) topology.Data

func (FileContainer) Has

func (fc FileContainer) Has(id string) bool

func (*FileContainer) Init

func (fc *FileContainer) Init(id string)

Contructor for FileContainer

func (FileContainer) Pop

func (fc FileContainer) Pop(id string) topology.Data

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)

func (FileContainer) Transfer

func (fc FileContainer) Transfer(when uint64, fileId string, data topology.Data, consequence func(time uint64) []event.Event) []event.Event

this should not care what location the scheduler used to estimate, it should find the best one and transfer from there

type SimpleFileDatabase

type SimpleFileDatabase map[string][]string

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

Jump to

Keyboard shortcuts

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