Documentation ¶
Index ¶
- Variables
- func GenerateIdentityFromSeed(seed []byte) (config.Identity, error)
- type Config
- type IpfsNode
- 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)
- func (l LevelDbBackedIndex) Remove(indexEntry SegmentIndexEntry) error
- type PeerConnection
- 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) CopyHistorySegmentToFile(ctx context.Context, historySegmentID string, targetFile string) 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) GetConnectedPeers() []PeerConnection
- func (p *Store) GetHighestBlockHeightEntry() (SegmentIndexEntry, error)
- func (p *Store) GetLocalNode() (IpfsNode, error)
- func (p *Store) GetPeerID() string
- func (p *Store) GetSwarmKey() string
- func (p *Store) GetSwarmKeySeed() string
- func (p *Store) ListAllIndexEntriesOldestFirst() ([]SegmentIndexEntry, error)
- func (p *Store) ResetIndex() error
- func (p *Store) Stop()
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 ¶
Types ¶
type Config ¶
type Config struct { // Mandatory Setting, must be set PeerID string `long:"peer-id" description:"the ipfs peer id of this node"` PrivKey string `long:"priv-key" description:"the ipfs priv key of this node"` // Optional Settings 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'"` HistoryRetentionBlockSpan int64 `` /* 138-byte string literal not displayed */ }
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)
func (LevelDbBackedIndex) Remove ¶
func (l LevelDbBackedIndex) Remove(indexEntry SegmentIndexEntry) error
type PeerConnection ¶ added in v0.68.0
type SegmentIndexEntry ¶
type SegmentIndexEntry struct { SegmentMetaData HistorySegmentID string }
func (SegmentIndexEntry) GetHistorySegmentId ¶ added in v0.68.0
func (i SegmentIndexEntry) GetHistorySegmentId() string
func (SegmentIndexEntry) GetPreviousHistorySegmentId ¶ added in v0.68.0
func (i SegmentIndexEntry) GetPreviousHistorySegmentId() string
type SegmentMetaData ¶
type SegmentMetaData struct { HeightFrom int64 HeightTo int64 ChainID string PreviousHistorySegmentID string }
func (SegmentMetaData) GetFromHeight ¶ added in v0.68.0
func (m SegmentMetaData) GetFromHeight() int64
func (SegmentMetaData) GetToHeight ¶ added in v0.68.0
func (m SegmentMetaData) GetToHeight() int64
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AddSnapshotData ¶
func (*Store) CopyHistorySegmentToFile ¶
func (*Store) CopySnapshotDataIntoDir ¶
func (*Store) FetchHistorySegment ¶
func (*Store) GetConnectedPeers ¶ added in v0.68.0
func (p *Store) GetConnectedPeers() []PeerConnection
func (*Store) GetHighestBlockHeightEntry ¶
func (p *Store) GetHighestBlockHeightEntry() (SegmentIndexEntry, error)
func (*Store) GetLocalNode ¶ added in v0.68.0
func (*Store) GetSwarmKey ¶
func (*Store) GetSwarmKeySeed ¶ added in v0.68.0
func (*Store) ListAllIndexEntriesOldestFirst ¶ added in v0.68.0
func (p *Store) ListAllIndexEntriesOldestFirst() ([]SegmentIndexEntry, error)
func (*Store) ResetIndex ¶
Click to show internal directories.
Click to hide internal directories.