MCPcopy
hub / github.com/golang/tools / Stream

Interface Stream

internal/jsonrpc2/stream.go:24–32  ·  view source on GitHub ↗

Stream abstracts the transport mechanics from the JSON RPC protocol. A Conn reads and writes messages using the stream it was provided on construction, and assumes that each call to Read or Write fully transfers a single message, or returns an error. A stream is not safe for concurrent use, it is ex

Source from the content-addressed store, hash-verified

22// A stream is not safe for concurrent use, it is expected it will be used by
23// a single Conn in a safe manner.
24type Stream interface {
25 // Read gets the next message from the stream.
26 Read(context.Context) (Message, int64, error)
27 // Write sends a message to the stream.
28 Write(context.Context, Message) (int64, error)
29 // Close closes the connection.
30 // Any blocked Read or Write operations will be unblocked and return errors.
31 Close() error
32}
33
34// Framer wraps a network connection up into a Stream.
35// It is responsible for the framing and encoding of messages into wire form.

Callers 17

runMethod · 0.65
NewPkgDecoderFunction · 0.65
initGeneratorFunction · 0.65
NewFatFileFunction · 0.65
NewFileFunction · 0.65
parseSymtabMethod · 0.65
pushSectionMethod · 0.65
cacheKeyMethod · 0.65
evaluatePackageHandleMethod · 0.65
buildPackageMethod · 0.65
fixMissingCurliesFunction · 0.65
AddTestForFuncFunction · 0.65

Implementers 5

loggingStreamgopls/internal/protocol/log.go
fakeConngopls/internal/util/fakenet/conn.go
rawStreaminternal/jsonrpc2/stream.go
headerStreaminternal/jsonrpc2/stream.go
idleListenerConninternal/jsonrpc2_v2/serve.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…