Documentation ¶
Index ¶
- Constants
- Variables
- func HandleTools()
- func ShouldHandleTools() bool
- type GetMessageFunc
- type ProxyStorage
- func (s *ProxyStorage) CachedMessage(messageID hornet.MessageID) (*storage.CachedMessage, error)
- func (s *ProxyStorage) CachedMessageMetadata(messageID hornet.MessageID) (*storage.CachedMetadata, error)
- func (s *ProxyStorage) Cleanup()
- func (s *ProxyStorage) MergeStorages() error
- func (s *ProxyStorage) SolidEntryPointsContain(messageID hornet.MessageID) (bool, error)
- func (s *ProxyStorage) SolidEntryPointsIndex(messageID hornet.MessageID) (milestone.Index, bool, error)
- func (s *ProxyStorage) StoreChild(parentMessageID hornet.MessageID, childMessageID hornet.MessageID) *storage.CachedChild
- func (s *ProxyStorage) StoreIndexation(index []byte, messageID hornet.MessageID) *storage.CachedIndexation
- func (s *ProxyStorage) StoreMessageIfAbsent(message *storage.Message) (cachedMsg *storage.CachedMessage, newlyAdded bool)
- func (s *ProxyStorage) StoreMilestoneIfAbsent(index milestone.Index, messageID hornet.MessageID, timestamp time.Time) (*storage.CachedMilestone, bool)
- type StoreMessageInterface
Constants ¶
View Source
const ( FlagToolDatabaseEngine = "databaseEngine" FlagToolDatabaseEngineSource = "sourceDatabaseEngine" FlagToolDatabaseEngineTarget = "targetDatabaseEngine" FlagToolConfigFilePath = "configFile" FlagToolDatabasePath = "databasePath" FlagToolDatabasePathSource = "sourceDatabasePath" FlagToolDatabasePathTarget = "targetDatabasePath" FlagToolSnapshotPath = "snapshotPath" FlagToolSnapshotPathFull = "fullSnapshotPath" FlagToolSnapshotPathDelta = "deltaSnapshotPath" FlagToolSnapshotPathTarget = "targetSnapshotPath" FlagToolOutputPath = "outputPath" FlagToolPrivateKey = "privateKey" FlagToolPublicKey = "publicKey" FlagToolHRP = "hrp" FlagToolBIP32Path = "bip32Path" FlagToolMnemonic = "mnemonic" FlagToolNetworkID = "networkID" FlagToolPassword = "password" FlagToolSalt = "salt" FlagToolOutputJSON = "json" FlagToolDescriptionOutputJSON = "format output as JSON" FlagToolBenchmarkCount = "count" FlagToolBenchmarkSize = "size" FlagToolBenchmarkThreads = "threads" FlagToolBenchmarkDuration = "duration" FlagToolCoordinatorFixStateCooStateFilePath = "stateFilePath" FlagToolSnapGenMintAddress = "mintAddress" FlagToolSnapGenTreasuryAllocation = "treasuryAllocation" FlagToolDatabaseTargetIndex = "targetIndex" FlagToolDatabaseMergeNodeURL = "nodeURL" FlagToolDatabaseMergeChronicle = "chronicleMode" FlagToolDatabaseMergeChronicleKeyspace = "chronicleKeySpace" )
View Source
const ( ToolPwdHash = "pwd-hash" ToolP2PIdentityGen = "p2pidentity-gen" ToolP2PExtractIdentity = "p2pidentity-extract" ToolEd25519Key = "ed25519-key" ToolEd25519Addr = "ed25519-addr" ToolJWTApi = "jwt-api" ToolSnapGen = "snap-gen" ToolSnapMerge = "snap-merge" ToolSnapInfo = "snap-info" ToolSnapHash = "snap-hash" ToolBenchmarkIO = "bench-io" ToolBenchmarkCPU = "bench-cpu" ToolDatabaseLedgerHash = "db-hash" ToolDatabaseHealth = "db-health" ToolDatabaseMerge = "db-merge" ToolDatabaseMigration = "db-migration" ToolDatabaseSnapshot = "db-snapshot" ToolDatabaseSplit = "db-split" ToolDatabaseVerify = "db-verify" ToolCoordinatorFixStateFile = "coo-fix-state" )
View Source
const ( DefaultValueAPIJWTTokenSalt = "HORNET" DefaultValueMainnetDatabasePath = "mainnetdb" DefaultValueP2PDatabasePath = "p2pstore" DefaultValueCoordinatorStateFilePath = "coordinator.state" DefaultValueDatabaseEngine = database.EngineRocksDB )
Variables ¶
View Source
var ( // Returned when a critical error stops the execution of a task. ErrCritical = errors.New("critical error") )
View Source
var ( // ErrNoNewTangleData is returned when there is no new data in the source database. ErrNoNewTangleData = errors.New("no new tangle history available") )
Functions ¶
func ShouldHandleTools ¶ added in v1.1.0
func ShouldHandleTools() bool
ShouldHandleTools checks if tools were requested.
Types ¶
type GetMessageFunc ¶ added in v1.2.0
type ProxyStorage ¶ added in v1.2.0
type ProxyStorage struct {
// contains filtered or unexported fields
}
ProxyStorage is used to temporarily store changes to an intermediate storage, which then can be merged with the target store in a single commit.
func NewProxyStorage ¶ added in v1.2.0
func NewProxyStorage( storeTarget *storage.Storage, milestoneManager *milestonemanager.MilestoneManager, getMessageFunc GetMessageFunc) (*ProxyStorage, error)
func (*ProxyStorage) CachedMessage ¶ added in v1.2.0
func (s *ProxyStorage) CachedMessage(messageID hornet.MessageID) (*storage.CachedMessage, error)
message +1
func (*ProxyStorage) CachedMessageMetadata ¶ added in v1.2.0
func (s *ProxyStorage) CachedMessageMetadata(messageID hornet.MessageID) (*storage.CachedMetadata, error)
meta +1
func (*ProxyStorage) Cleanup ¶ added in v1.2.0
func (s *ProxyStorage) Cleanup()
Cleanup shuts down, flushes and closes the proxy store.
func (*ProxyStorage) MergeStorages ¶ added in v1.2.0
func (s *ProxyStorage) MergeStorages() error
func (*ProxyStorage) SolidEntryPointsContain ¶ added in v1.2.0
func (s *ProxyStorage) SolidEntryPointsContain(messageID hornet.MessageID) (bool, error)
func (*ProxyStorage) SolidEntryPointsIndex ¶ added in v1.2.0
func (*ProxyStorage) StoreChild ¶ added in v1.2.0
func (s *ProxyStorage) StoreChild(parentMessageID hornet.MessageID, childMessageID hornet.MessageID) *storage.CachedChild
func (*ProxyStorage) StoreIndexation ¶ added in v1.2.0
func (s *ProxyStorage) StoreIndexation(index []byte, messageID hornet.MessageID) *storage.CachedIndexation
func (*ProxyStorage) StoreMessageIfAbsent ¶ added in v1.2.0
func (s *ProxyStorage) StoreMessageIfAbsent(message *storage.Message) (cachedMsg *storage.CachedMessage, newlyAdded bool)
StoreMessageInterface
func (*ProxyStorage) StoreMilestoneIfAbsent ¶ added in v1.2.0
func (s *ProxyStorage) StoreMilestoneIfAbsent(index milestone.Index, messageID hornet.MessageID, timestamp time.Time) (*storage.CachedMilestone, bool)
type StoreMessageInterface ¶ added in v1.2.0
type StoreMessageInterface interface { StoreMessageIfAbsent(message *storage.Message) (cachedMsg *storage.CachedMessage, newlyAdded bool) StoreChild(parentMessageID hornet.MessageID, childMessageID hornet.MessageID) *storage.CachedChild StoreIndexation(index []byte, messageID hornet.MessageID) *storage.CachedIndexation StoreMilestoneIfAbsent(index milestone.Index, messageID hornet.MessageID, timestamp time.Time) (*storage.CachedMilestone, bool) }
Source Files ¶
- benchmark.go
- benchmark_cpu.go
- benchmark_io.go
- coordinator_fix_state.go
- database.go
- database_hash.go
- database_health.go
- database_merge.go
- database_migration.go
- database_snapshot.go
- database_split.go
- database_verify.go
- ed25519.go
- jwt.go
- p2p_identity_extract.go
- p2p_identity_gen.go
- pwd_hash.go
- snap_gen.go
- snap_hash.go
- snap_info.go
- snap_merge.go
- toolset.go
Click to show internal directories.
Click to hide internal directories.