MCPcopy
hub / github.com/protomaps/PMTiles / Source

Interface Source

js/src/index.ts:295–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293 * Interface for retrieving an archive from remote or local storage.
294 */
295export interface Source {
296 getBytes: (
297 offset: number,
298 length: number,
299 signal?: AbortSignal,
300 etag?: string
301 ) => Promise<RangeResponse>;
302
303 /**
304 * Return a unique string key for the archive e.g. a URL.
305 */
306 getKey: () => string;
307}
308
309/**
310 * Use the Browser's File API, which is different from the NodeJS file API.

Callers

nothing calls this directly

Implementers 5

S3Sourceserverless/aws/src/index.ts
R2Sourceserverless/cloudflare/src/index.ts
TestNodeFileSourcejs/test/v3.test.ts
FileSourcejs/src/index.ts
FetchSourcejs/src/index.ts

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…