SvSync.create options.

interface Options {
    describe?: string;
    fw?: Forwarder;
    initialize?: ((sync: SvSync) => Promisable<void>);
    initialStateVector?: StateVector;
    periodicTimeout?: number | [median: number, jitter: number];
    signer?: Signer;
    steadyTimer?: [median: number, jitter: number];
    suppressionPeriod?: number;
    suppressionTimeout?: (() => number);
    suppressionTimer?: [median: number, jitter: number];
    svs2interest?: boolean;
    svs2suppression?: boolean;
    syncInterestLifetime?: number;
    syncPrefix: Name;
    verifier?: Verifier;
}

Properties

describe?: string

Description for debugging purpose.

Use the specified logical forwarder.

Forwarder.getDefault()

initialize?: ((sync: SvSync) => Promisable<void>)

Application initialization function.

During initialization, it's possible to remove SyncNode or decrease seqNum. Calling sync.close() has no effect.

Sync protocol starts running after the returned Promise is resolved.

initialStateVector?: StateVector

Initial state vector.

empty state vector

periodicTimeout?: number | [median: number, jitter: number]

Sync Interest timer in steady state (SVS v2).

[30000ms, ±10%]

If specified as tuple,

  • median: median interval in milliseconds.
  • jitter: ± percentage, in [0.0, 1.0) range.

If specified as number, it's interpreted as median.

SVS v1 steadyTimer and SVS v2 periodicTimeout are equivalent. If both are specified, this option takes precedence.

signer?: Signer

Sync Interest signer.

nullSigner

steadyTimer?: [median: number, jitter: number]

Sync Interest timer in steady state (SVS v1).

[30000ms, ±10%]

  • median: median interval in milliseconds.
  • jitter: ± percentage, in [0.0, 1.0) range.
suppressionPeriod?: number

Sync Interest timer in suppression state, maximum value (SVS v2).

200ms

suppressionTimeout?: (() => number)

Sync Interest timer in suppression state, value generator (SVS v2).

SvSync.suppressionExpDelay(suppressionPeriod)

The maximum value returned by the generator function should be suppressionPeriod.

This option takes effect only if .svs2suppression is true.

suppressionTimer?: [median: number, jitter: number]

Sync Interest timer in suppression state (SVS v1).

[200ms, ±50%]

  • median: median interval in milliseconds.
  • jitter: ± percentage, in [0.0, 1.0) range.

This option takes effect only if .svs2suppression is false.

svs2interest?: boolean

Encode sync Interest in SVS v2 format.

false

svs2suppression?: boolean

Use SVS v2 suppression timer and suppression logic.

false

syncInterestLifetime?: number

Sync Interest lifetime in milliseconds.

1000

syncPrefix: Name

Sync group prefix.

verifier?: Verifier

Sync Interest verifier.

no verification