Interface for cargo relay clients

interface CargoRelayClient {
    close: (() => void);
    collectCargo: (() => readonly Buffer[]);
    deliverCargo: ((cargo) => IterableIterator<string>);
}

Properties

close: (() => void)

Close the underlying connection, if applicable

Type declaration

    • (): void
    • Close the underlying connection, if applicable

      Returns void

collectCargo: (() => readonly Buffer[])

Collect and return cargo

Type declaration

    • (): readonly Buffer[]
    • Collect and return cargo

      Returns readonly Buffer[]

deliverCargo: ((cargo) => IterableIterator<string>)

Deliver the cargo yielded by the input iterator and return the local ids of the acknowledged deliveries

Type declaration

    • (cargo): IterableIterator<string>
    • Deliver the cargo yielded by the input iterator and return the local ids of the acknowledged deliveries

      Parameters

      Returns IterableIterator<string>

Generated using TypeDoc