fgb-vt - v1.0.4
    Preparing search index...

    Interface Connector

    interface Connector {
        close(): Promise<void>;
        read(
            path: string,
            offset: number,
            length: number,
        ): Promise<Uint8Array<ArrayBufferLike>>;
        readRanges(
            path: string,
            ranges: readonly { length: number; offset: number }[],
        ): Promise<Uint8Array<ArrayBufferLike>[]>;
    }

    Implemented by

    Index

    Methods

    • Release all resources held by this connector (pooled connections, open file handles, SDK clients, etc.).

      After calling close(), the connector must not be used for further reads. Calling close() on an already-closed connector should be a safe no-op.

      Returns Promise<void>

      Resolves when all resources have been released.

    • Read a contiguous byte range from the resource at path.

      The path format is connector-specific (filesystem path, URL, S3 URI, etc.).

      Parameters

      • path: string

        Connector-specific resource identifier.

      • offset: number

        Zero-based byte offset to begin reading from.

      • length: number

        Number of bytes to read.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      The requested byte range as a Uint8Array. The returned array may be shorter than length if the resource is smaller than offset + length.

      If the resource cannot be read (file not found, network error, permission denied, etc.).

    • Read multiple byte ranges from the same resource.

      Implementations may batch, parallelize, or pipeline these reads to optimize throughput for the underlying backend. The returned array preserves the order of the input ranges.

      Parameters

      • path: string

        Connector-specific resource identifier.

      • ranges: readonly { length: number; offset: number }[]

        Array of { offset, length } byte-range descriptors.

      Returns Promise<Uint8Array<ArrayBufferLike>[]>

      Array of Uint8Array chunks corresponding positionally to the input ranges.

      If any individual range read fails.