MCPcopy Create free account
hub / github.com/electric-sql/electric / create

Method create

packages/agents-server/src/stream-client.ts:227–244  ·  view source on GitHub ↗
(
    path: string,
    opts: { contentType: string; body?: Uint8Array | string; closed?: boolean }
  )

Source from the content-addressed store, hash-verified

225 }
226
227 async create(
228 path: string,
229 opts: { contentType: string; body?: Uint8Array | string; closed?: boolean }
230 ): Promise<void> {
231 return await withSpan(`stream.create`, async (span) => {
232 span.setAttributes({
233 [ATTR.STREAM_PATH]: path,
234 [ATTR.STREAM_OP]: `create`,
235 })
236 await DurableStream.create({
237 url: this.streamUrl(path),
238 headers: this.streamHeaders(),
239 contentType: opts.contentType,
240 body: opts.body,
241 closed: opts.closed,
242 })
243 })
244 }
245
246 async fork(
247 path: string,

Callers 1

ensureMethod · 0.95

Calls 4

streamUrlMethod · 0.95
streamHeadersMethod · 0.95
withSpanFunction · 0.85
createMethod · 0.65

Tested by

no test coverage detected