Documentation
¶
Overview ¶
Package state provides high-level state wrappers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStatefileReader ¶
func NewStatefileReader(source io.ReadCloser, key []byte) (io.ReadCloser, map[string]string, error)
NewStatefileReader returns the statefile's metadata and a reader for it. The ownership of source is transferred to the returned reader.
Types ¶
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 io.WriteCloser
// PagesFile is the file in which all MemoryFile pages are stored if
// PagesFile is non-nil. Otherwise this content is stored in Destination.
PagesFile stateio.AsyncWriter
// Key is used for state integrity check.
Key []byte
// Metadata is save metadata.
Metadata map[string]string
// AppMFExcludeCommittedZeroPages is the value of
// pgalloc.SaveOpts.ExcludeCommittedZeroPages for the application memory
// file.
AppMFExcludeCommittedZeroPages bool
// Resume indicates if the statefile is used for save-resume.
Resume bool
// Autosave indicates if the statefile is used for autosave.
Autosave bool
}
SaveOpts contains save-related options.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package checkpointfiles defines constants used when sentry state is checkpointed to multiple files in a directory rather than to an opaque FD.
|
Package checkpointfiles defines constants used when sentry state is checkpointed to multiple files in a directory rather than to an opaque FD. |
|
Package stateio defines I/O types used by sentry save/restore.
|
Package stateio defines I/O types used by sentry save/restore. |
Click to show internal directories.
Click to hide internal directories.