MCPcopy Index your code
hub / github.com/coder/coder / NewStream

Method NewStream

coderd/tracing/drpc.go:44–46  ·  view source on GitHub ↗

NewStream implements drpc.Conn's NewStream method with tracing information injected into the context.

(ctx context.Context, rpc string, enc drpc.Encoding)

Source from the content-addressed store, hash-verified

42
43// NewStream implements drpc.Conn's NewStream method with tracing information injected into the context.
44func (c *DRPCConn) NewStream(ctx context.Context, rpc string, enc drpc.Encoding) (_ drpc.Stream, err error) {
45 return c.Conn.NewStream(c.addMetadata(ctx), rpc, enc)
46}
47
48// addMetadata propagates the headers into a map that we inject into drpc metadata so they are
49// sent across the wire for the server to get.

Callers 11

NewStreamMethod · 0.95
AcquireJobWithCancelMethod · 0.45
UploadFileMethod · 0.45
DownloadFileMethod · 0.45
SessionMethod · 0.45
TestSimpleFunction · 0.45
TestOpenAIInjectedToolsFunction · 0.45
StreamDERPMapsMethod · 0.45
CoordinateMethod · 0.45
WorkspaceUpdatesMethod · 0.45

Calls 1

addMetadataMethod · 0.95

Tested by 3

TestSimpleFunction · 0.36
TestOpenAIInjectedToolsFunction · 0.36