MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / constructor

Method constructor

lib/s3-handler.ts:38–48  ·  view source on GitHub ↗
(bucket: string, region: string)

Source from the content-addressed store, hash-verified

36 readonly region: string;
37
38 constructor(bucket: string, region: string) {
39 const maybeInstance = clientsByRegion.get(region);
40 if (maybeInstance) {
41 this.instance = maybeInstance;
42 } else {
43 this.instance = new S3({region, credentials: awsCredentials()});
44 clientsByRegion.set(region, this.instance);
45 }
46 this.bucket = bucket;
47 this.region = region;
48 }
49
50 async get(key: string, path: string): Promise<GetResult> {
51 try {

Callers

nothing calls this directly

Calls 3

awsCredentialsFunction · 0.85
getMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected