Documentation ¶
Index ¶
- Variables
- func GenerateIdentityFromSeed(seed []byte) (config.Identity, error)
- type Config
- type IpfsNode
- type LevelDbBackedIndex
- func (l LevelDbBackedIndex) Add(indexEntry segment.Full) error
- func (l LevelDbBackedIndex) Close() error
- func (l LevelDbBackedIndex) Get(height int64) (segment.Full, error)
- func (l LevelDbBackedIndex) GetHighestBlockHeightEntry() (segment.Full, error)
- func (l LevelDbBackedIndex) ListAllEntriesMostRecentFirst() (segment.Segments[segment.Full], error)
- func (l LevelDbBackedIndex) ListAllEntriesOldestFirst() (segment.Segments[segment.Full], error)
- func (l LevelDbBackedIndex) Remove(indexEntry segment.Full) error
- type PeerConnection
- type Store
- func (p *Store) AddSnapshotData(ctx context.Context, s segment.Unpublished) (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) FetchHistorySegment(ctx context.Context, historySegmentID string) (segment.Full, error)
- func (p *Store) GetConnectedPeers() []PeerConnection
- func (p *Store) GetHighestBlockHeightEntry() (segment.Full, error)
- func (p *Store) GetHistorySegmentReader(ctx context.Context, historySegmentID string) (io.ReadSeekCloser, int64, error)
- func (p *Store) GetLocalNode() (IpfsNode, error)
- func (p *Store) GetPeerID() string
- func (p *Store) GetPreviousHistorySegmentID(fromHeight int64) (string, error)
- func (p *Store) GetSegmentForHeight(toHeight int64) (segment.Full, error)
- func (p *Store) GetSwarmKey() string
- func (p *Store) GetSwarmKeySeed() string
- func (p *Store) ListAllIndexEntriesMostRecentFirst() (segment.Segments[segment.Full], error)
- func (p *Store) ListAllIndexEntriesOldestFirst() (segment.Segments[segment.Full], error)
- func (p *Store) RemoveSegments(ctx context.Context, segmentsToRemove []segment.Full) error
- func (p *Store) ResetIndex() error
- func (p *Store) StagedContiguousHistory(chunk segment.ContiguousHistory[segment.Full]) (segment.ContiguousHistory[segment.Staged], error)
- func (p *Store) StagedSegment(s segment.Full) (segment.Staged, 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 (LevelDbBackedIndex) Close ¶
func (l LevelDbBackedIndex) Close() error
func (LevelDbBackedIndex) GetHighestBlockHeightEntry ¶
func (l LevelDbBackedIndex) GetHighestBlockHeightEntry() (segment.Full, error)
func (LevelDbBackedIndex) ListAllEntriesMostRecentFirst ¶ added in v0.71.0
func (LevelDbBackedIndex) ListAllEntriesOldestFirst ¶
type PeerConnection ¶ added in v0.68.0
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AddSnapshotData ¶
func (*Store) CopyHistorySegmentToFile ¶
func (*Store) FetchHistorySegment ¶
func (*Store) GetConnectedPeers ¶ added in v0.68.0
func (p *Store) GetConnectedPeers() []PeerConnection
func (*Store) GetHighestBlockHeightEntry ¶
func (*Store) GetHistorySegmentReader ¶ added in v0.71.0
func (*Store) GetLocalNode ¶ added in v0.68.0
func (*Store) GetPreviousHistorySegmentID ¶ added in v0.71.0
func (*Store) GetSegmentForHeight ¶ added in v0.71.0
func (*Store) GetSwarmKey ¶
func (*Store) GetSwarmKeySeed ¶ added in v0.68.0
func (*Store) ListAllIndexEntriesMostRecentFirst ¶ added in v0.71.0
func (*Store) ListAllIndexEntriesOldestFirst ¶ added in v0.68.0
func (*Store) RemoveSegments ¶ added in v0.71.0
func (*Store) ResetIndex ¶
func (*Store) StagedContiguousHistory ¶ added in v0.71.0
func (p *Store) StagedContiguousHistory(chunk segment.ContiguousHistory[segment.Full]) (segment.ContiguousHistory[segment.Staged], error)
func (*Store) StagedSegment ¶ added in v0.71.0
Click to show internal directories.
Click to hide internal directories.