-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: remove dudewhere and satnav (#110)
Content claims should satisfy ALL requests now. If no content claims, then we genuinely do not have, with one exception (see below). Hence falling back to DUDEWHERE/SATNAV does not yield any results. This removes DUDEWHERE and SATNAV bindings but keeps CARPARK to allow us to serve CAR files from R2 - not all CAR files (legacy CARs) have content claims.
- Loading branch information
Alan Shaw
authored
Jun 19, 2024
1 parent
2957437
commit f510808
Showing
20 changed files
with
2,997 additions
and
8,725 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,7 @@ | ||
import type { Link } from 'multiformats/link' | ||
import type { Context } from '@web3-storage/gateway-lib' | ||
import type { CARLink } from 'cardex/api' | ||
import type { R2Bucket, KVNamespace } from '@cloudflare/workers-types' | ||
import type { MemoryBudget } from './lib/mem-budget' | ||
|
||
export {} | ||
import type { R2Bucket } from '@cloudflare/workers-types' | ||
|
||
export interface Environment { | ||
DEBUG: string | ||
CARPARK: R2Bucket | ||
DUDEWHERE: R2Bucket | ||
SATNAV: R2Bucket | ||
MAX_SHARDS: string | ||
CONTENT_CLAIMS_SERVICE_URL?: string | ||
} | ||
|
||
/** | ||
* Simple bucket does not allow range requests or support metadata on returned | ||
* objects. | ||
*/ | ||
export interface SimpleBucket { | ||
get (key: string): Promise<SimpleBucketObject | null> | ||
} | ||
|
||
export interface SimpleBucketObject { | ||
readonly key: string | ||
readonly body: ReadableStream | ||
arrayBuffer(): Promise<ArrayBuffer> | ||
} | ||
|
||
export interface IndexSource { | ||
/** Bucket this index can be found in */ | ||
bucket: SimpleBucket | ||
/** Bucket key for the source */ | ||
key: string | ||
/** | ||
* Origin CAR CID the index source applies to. Will be undefined if the index | ||
* source is a multi-index index, which specifies origin CAR CIDs within the | ||
* index. | ||
*/ | ||
origin?: CARLink | ||
} | ||
|
||
export interface IndexSourcesContext extends Context { | ||
indexSources: IndexSource[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export const MAX_CAR_BYTES_IN_MEMORY = 1024 * 1024 * 5 | ||
export const CAR_CODE = 0x0202 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.