webtessera
Appender, options, publication awaiter, antispam, witnessing, migration.
It ports the Go package tessera.
Its source is src/index.ts.
Functions
errorAs- errorAs finds the first error in err's tree that is an instance of ctor and returns it, or undefined if there is none.
errorIs- errorIs reports whether any error in err's tree matches target, mirroring
errors.Is. newAppender- newAppender returns an Appender, which allows a personality to incrementally append new leaves to the log and to read from it.
newAppendOptions- newAppendOptions creates a new options struct for configuring appender lifecycle instances.
newCertificateTransparencyAppender- newCertificateTransparencyAppender returns a function which knows how to add a CT-specific entry type to the log.
newEntry- newEntry creates a new Entry object with leaf data.
newMigrationOptions- newMigrationOptions constructs a MigrationOptions carrying Tessera's own default tlog-tiles layout, identity hasher and Merkle leaf hasher.
newMigrationTarget- newMigrationTarget returns a MigrationTarget, which allows a personality to "import" a C2SP tlog-tiles or static-ct compliant log into a Tessera instance.
newPublicationAwaiter- newPublicationAwaiter provides an PublicationAwaiter that can be cancelled using the provided signal.
newWitness- newWitness returns a Witness given a verifier key and the root URL for where this witness can be reached.
newWitnessGroup- newWitnessGroup creates a grouping of Witness or WitnessGroup with a configurable threshold of these sub-components that need to be satisfied in order for this group to be satisfied.
newWitnessGroupFromPolicy- newWitnessGroupFromPolicy creates a graph of witness objects that represents the policy provided, and which can be passed directly to the WithWitnesses appender lifecycle option.
withCTLayout- withCTLayout instructs the underlying storage to use a Static CT API compatible scheme for layout.
Classes
Appender- Appender allows personalities access to the lifecycle methods associated with logs in sequencing mode.
AppendOptions- AppendOptions holds settings for all storage implementations.
Entry- Entry represents an entry in a log.
MigrationOptions- MigrationOptions holds migration lifecycle settings for all storage implementations.
MigrationTarget- MigrationTarget handles the process of migrating/importing a source log into a Tessera instance.
PublicationAwaiter- PublicationAwaiter allows client threads to block until a leaf is published.
Witness- Witness represents a single witness that can be reached in order to perform a witnessing operation.
WitnessGroup- WitnessGroup defines a group of witnesses, and a threshold of signatures that must be met for this group to be satisfied.
WitnessOptions- WitnessOptions contains extra optional configuration for how Tessera should use/interact with a user-provided WitnessGroup policy.
Interfaces
Antispam- Antispam describes the contract that an antispam implementation must meet in order to be used via the WithAntispam option below.
AppenderInit- AppenderInit is what a Driver's appender() method returns.
AppendLifecycle- AppendLifecycle is the interface a Driver must satisfy to support Appender mode.
Follower- Follower describes the contract of an entity which tracks the contents of the local log.
Index- Index represents a durably assigned index for some entry.
LogReader- LogReader provides read-only access to the log.
NewAppenderResult- NewAppenderResult is what newAppender returns.
Types
AddFn- AddFn adds a new entry to be sequenced by the storage implementation.
Driver- Driver is the implementation-specific parts of Tessera.
IndexFuture- IndexFuture is the signature of a function which can return an assigned index or error.
Constants and variables
DefaultAntispamInMemorySize- DefaultAntispamInMemorySize is the recommended default limit on the number of entries in the in-memory antispam cache.
DefaultBatchMaxAge- DefaultBatchMaxAge is used by storage implementations if no WithBatching option is provided when instantiating it.
DefaultBatchMaxSize- DefaultBatchMaxSize is used by storage implementations if no WithBatching option is provided when instantiating it.
DefaultCheckpointInterval- DefaultCheckpointInterval is used by storage implementations if no WithCheckpointInterval option is provided when instantiating it.
DefaultCheckpointRepublishInterval- DefaultCheckpointRepublishInterval is used by storage implementations if no WithCheckpointRepublishInterval option is provided when instantiating it.
DefaultGarbageCollectionInterval- DefaultGarbageCollectionInterval is the default value used if no WithGarbageCollectionInterval option is provided.
DefaultPushbackMaxOutstanding- DefaultPushbackMaxOutstanding is used by storage implementations if no WithPushback option is provided when instantiating it.
DefaultWitnessTimeout- DefaultWitnessTimeout is the default maximum time to wait for responses from configured witnesses.
ErrNotExist- ErrNotExist stands in for
os.ErrNotExist. ErrPushback- ErrPushback is returned by underlying storage implementations when a new entry cannot be accepted due to overload in the system.
ErrPushbackAntispam- ErrPushbackAntispam is a wrapped ErrPushback.
ErrPushbackIntegration- ErrPushbackIntegration is a wrapped ErrPushback.