Documentation ¶
Index ¶
- Variables
- type Config
- type LevelDbBackedIndex
- func (l LevelDbBackedIndex) Add(indexEntry SegmentIndexEntry) error
- func (l LevelDbBackedIndex) Close() error
- func (l LevelDbBackedIndex) Get(height int64) (SegmentIndexEntry, error)
- func (l LevelDbBackedIndex) GetHighestBlockHeightEntry() (SegmentIndexEntry, error)
- func (l LevelDbBackedIndex) ListAllEntriesOldestFirst() ([]SegmentIndexEntry, error)
- type SegmentIndexEntry
- type SegmentMetaData
- type Store
- func (p *Store) AddSnapshotData(ctx context.Context, historySnapshot snapshot.History, ...) (err error)
- func (p *Store) ConnectedToPeer(peerIDStr string) (bool, error)
- func (p *Store) CopySnapshotDataIntoDir(ctx context.Context, toHeight int64, targetDir string) (currentStateSnapshot snapshot.CurrentState, historySnapshot snapshot.History, ...)
- func (p *Store) FetchHistorySegment(ctx context.Context, historySegmentID string) (SegmentIndexEntry, error)
- func (p *Store) GetHighestBlockHeightEntry() (SegmentIndexEntry, error)
- func (p *Store) GetPeerAddrs() []ma.Multiaddr
- func (p *Store) GetPeerID() string
- func (p *Store) ListAllHistorySegments() ([]SegmentIndexEntry, error)
- func (p *Store) ResetIndex() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIndexEntryNotFound = errors.New("index entry not found")
View Source
var ErrSegmentNotFound = errors.New("segment not found")
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Mandatory Setting, must be set IDSeed string `long:"id-seed" description:"used to generate the id and Key pair for this node"` // Optional Settings UseIpfsDefaultPeers encoding.Bool `long:"use-ipfs-default-peers" description:"if true ipfs default peers will be appended to the bootstrap peers"` BootstrapPeers []string `` /* 145-byte string literal not displayed */ SwarmPort int `long:"swarm-port" description:"ipfs swarm port"` // Without this there would be no way to isolate an environment if needed and process a given chains data (e.g. for dev) SwarmKeyOverride string `long:"swarm-key-override" description:"optional swarm key override, the default behaviour is to use the datanode's chain id'"` StartWebUI encoding.Bool `long:"start-web-ui" description:"if true the store will expose the ipfs web UI"` WebUIPort int `long:"webui-port" description:"webui port"` }
func NewDefaultConfig ¶
func NewDefaultConfig() Config
type LevelDbBackedIndex ¶
type LevelDbBackedIndex struct {
// contains filtered or unexported fields
}
func NewIndex ¶
func NewIndex(dataDir string) (*LevelDbBackedIndex, error)
func (LevelDbBackedIndex) Add ¶
func (l LevelDbBackedIndex) Add(indexEntry SegmentIndexEntry) error
func (LevelDbBackedIndex) Close ¶
func (l LevelDbBackedIndex) Close() error
func (LevelDbBackedIndex) Get ¶
func (l LevelDbBackedIndex) Get(height int64) (SegmentIndexEntry, error)
func (LevelDbBackedIndex) GetHighestBlockHeightEntry ¶
func (l LevelDbBackedIndex) GetHighestBlockHeightEntry() (SegmentIndexEntry, error)
func (LevelDbBackedIndex) ListAllEntriesOldestFirst ¶
func (l LevelDbBackedIndex) ListAllEntriesOldestFirst() ([]SegmentIndexEntry, error)
type SegmentIndexEntry ¶
type SegmentIndexEntry struct { SegmentMetaData HistorySegmentID string }
type SegmentMetaData ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AddSnapshotData ¶
func (*Store) CopySnapshotDataIntoDir ¶
func (*Store) FetchHistorySegment ¶
func (*Store) GetHighestBlockHeightEntry ¶
func (p *Store) GetHighestBlockHeightEntry() (SegmentIndexEntry, error)
func (*Store) GetPeerAddrs ¶
func (*Store) ListAllHistorySegments ¶
func (p *Store) ListAllHistorySegments() ([]SegmentIndexEntry, error)
func (*Store) ResetIndex ¶
Click to show internal directories.
Click to hide internal directories.