Documentation
¶
Overview ¶
Package document coordinates the piece tree, recovery WAL, transactional history, leased source generations, and atomic persistence.
Index ¶
- Variables
- type ApplyResult
- type EOLStyle
- type Metadata
- type OpenOptions
- type ReplaceOperation
- type Session
- func (s *Session) ApplyBatch(ctx context.Context, expectedRevision uint64, operations []ReplaceOperation) (ApplyResult, error)
- func (s *Session) Close() error
- func (s *Session) CommitAtLeast(expectedRevision uint64) (Metadata, error)
- func (s *Session) Metadata() Metadata
- func (s *Session) ReadAt(p []byte, off int64) (int, error)
- func (s *Session) Redo() (ApplyResult, error)
- func (s *Session) Save() (Metadata, error)
- func (s *Session) Snapshot() (uint64, SnapshotLease, error)
- func (s *Session) Undo() (ApplyResult, error)
- type SnapshotLease
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRevisionConflict = errors.New("document: revision conflict") ErrInvalidUTF8 = errors.New("document: file is not UTF-8") ErrClosed = errors.New("document: session closed") ErrNothingToUndo = errors.New("document: nothing to undo") ErrNothingToRedo = errors.New("document: nothing to redo") ErrExternalChange = errors.New("document: file changed on disk") ErrRevisionOverflow = errors.New("document: revision overflow") )
Functions ¶
This section is empty.
Types ¶
type ApplyResult ¶
type OpenOptions ¶
type ReplaceOperation ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) ApplyBatch ¶
func (s *Session) ApplyBatch(ctx context.Context, expectedRevision uint64, operations []ReplaceOperation) (ApplyResult, error)
func (*Session) CommitAtLeast ¶
CommitAtLeast atomically persists a snapshot whose revision is at least the requested revision. New edits continue in the current generation while the snapshot is streamed.
func (*Session) Redo ¶
func (s *Session) Redo() (ApplyResult, error)
func (*Session) Undo ¶
func (s *Session) Undo() (ApplyResult, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
Package save contains streaming, crash-safe document persistence.
|
Package save contains streaming, crash-safe document persistence. |
|
Package store implements a bounded-memory source store for large documents.
|
Package store implements a bounded-memory source store for large documents. |
Click to show internal directories.
Click to hide internal directories.