Documentation
¶
Overview ¶
Package spool maintains the scratch space used for WAL retrieval
Index ¶
- Variables
- type WALSpool
- func (spool *WALSpool) Contains(walFile string) (bool, error)
- func (spool *WALSpool) CreateTemp(walName string) (*os.File, error)
- func (spool *WALSpool) Directory() string
- func (spool *WALSpool) FileName(walName string) string
- func (spool *WALSpool) MoveOut(walName, destination string) (err error)
- func (spool *WALSpool) Remove(walFile string) error
- func (spool *WALSpool) RemoveTemp() error
- func (spool *WALSpool) Touch(walFile string) (err error)
Constants ¶
This section is empty.
Variables ¶
var ErrorNonExistentFile = fs.ErrNotExist
ErrorNonExistentFile is returned when the spool tried to work on a file which doesn't exist
Functions ¶
This section is empty.
Types ¶
type WALSpool ¶
type WALSpool struct {
// contains filtered or unexported fields
}
WALSpool is a way to keep track of which WAL files were processes from the parallel feature and not by PostgreSQL request. It works using a directory, under which we create an empty file carrying the name of the WAL we archived
func (*WALSpool) CreateTemp ¶ added in v0.10.0
CreateTemp creates a new temporary file in the spool directory to download walName into before it is renamed to FileName(walName).
func (*WALSpool) Remove ¶
Remove removes a WAL file from the spool. If the WAL file doesn't exist an error is returned
func (*WALSpool) RemoveTemp ¶ added in v0.10.0
RemoveTemp removes the temporary files that CreateTemp left in the spool directory.