Documentation ¶
Overview ¶
Package state provides high-level state wrappers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrStateFile ¶
type ErrStateFile struct {
// contains filtered or unexported fields
}
ErrStateFile is returned when an error is encountered writing the statefile (which may occur during open or close calls in addition to write).
type LoadOpts ¶
type LoadOpts struct { // Source is the load source. Source io.Reader // PagesMetadata is the file into which MemoryFile metadata is stored if // PagesMetadata is non-nil. Otherwise this content is stored in Source. PagesMetadata *fd.FD // PagesFile is the file in which all MemoryFile pages are stored if // PagesFile is non-nil. Otherwise this content is stored in Source. PagesFile *fd.FD // Key is used for state integrity check. Key []byte }
LoadOpts contains load-related options.
type SaveOpts ¶
type SaveOpts struct { // Destination is the save target. Destination io.Writer // PagesMetadata is the file into which MemoryFile metadata is stored if // PagesMetadata is non-nil. Otherwise this content is stored in Destination. PagesMetadata *fd.FD // PagesFile is the file in which all MemoryFile pages are stored if // PagesFile is non-nil. Otherwise this content is stored in Destination. PagesFile *fd.FD // Key is used for state integrity check. Key []byte // Metadata is save metadata. Metadata map[string]string // MemoryFileSaveOpts is passed to calls to pgalloc.MemoryFile.SaveTo(). MemoryFileSaveOpts pgalloc.SaveOpts // Callback is called prior to unpause, with any save error. Callback func(err error) // Resume indicates if the statefile is used for save-resume. Resume bool }
SaveOpts contains save-related options.
Click to show internal directories.
Click to hide internal directories.