MCPcopy
hub / github.com/grpc/grpc-go / Write

Method Write

internal/binarylog/sink.go:99–111  ·  view source on GitHub ↗
(e *binlogpb.GrpcLogEntry)

Source from the content-addressed store, hash-verified

97}
98
99func (fs *bufferedSink) Write(e *binlogpb.GrpcLogEntry) error {
100 fs.mu.Lock()
101 defer fs.mu.Unlock()
102 if !fs.flusherStarted {
103 // Start the write loop when Write is called.
104 fs.startFlushGoroutine()
105 fs.flusherStarted = true
106 }
107 if err := fs.out.Write(e); err != nil {
108 return err
109 }
110 return nil
111}
112
113const (
114 bufFlushDuration = 60 * time.Second

Callers

nothing calls this directly

Calls 4

startFlushGoroutineMethod · 0.95
WriteMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected