Documentation
¶
Overview ¶
Package scheduler provides the scheduler, which takes requests of particular types (e.g. read, write, open) and returns how long they should wait before completing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Request ¶
type Request struct { Type RequestType Timestamp time.Time Path string Start units.NumBytes Size units.NumBytes }
Request contains information for all types of requests.
type RequestType ¶
type RequestType int64
RequestType denotes what type a request is.
const ( ReadRequest RequestType = iota WriteRequest OpenRequest CloseRequest FsyncRequest AllocateRequest MetadataRequest )
Enumeration of different types of requests.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler determines how long operations should take given a description of a physical medium.
func New ¶
func New(config *slowfs.DeviceConfig) *Scheduler
New creates a new Scheduler using the given DeviceConfig to help compute how long requests should take.
Click to show internal directories.
Click to hide internal directories.