ws

package
v0.0.0-...-d12bbc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package ws contains a Witness Store backed by a file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage is a Witness Storage intended for storing witness checkpoints. Currently a simple file is used as a storage mechanism

func NewStorage

func NewStorage(fp string) (*Storage, error)

NewStorage creates a new WS that uses the given file as DB backend. The DB will be initialized if needed.

func (*Storage) RetrieveCP

func (ws *Storage) RetrieveCP() ([]byte, error)

RetrieveCP gets the checkpoint previously stored.

func (*Storage) StoreCP

func (ws *Storage) StoreCP(wcp []byte) error

StoreCP saves the given checkpoint into DB.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL