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

Method logEntries

binarylog/binarylog_end2end_test.go:83–97  ·  view source on GitHub ↗

Returns all client entries if client is true, otherwise return all server entries.

(client bool)

Source from the content-addressed store, hash-verified

81// Returns all client entries if client is true, otherwise return all server
82// entries.
83func (s *testBinLogSink) logEntries(client bool) []*binlogpb.GrpcLogEntry {
84 logger := binlogpb.GrpcLogEntry_LOGGER_SERVER
85 if client {
86 logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT
87 }
88 var ret []*binlogpb.GrpcLogEntry
89 s.mu.Lock()
90 for _, e := range s.buf {
91 if e.Logger == logger {
92 ret = append(ret, e)
93 }
94 }
95 s.mu.Unlock()
96 return ret
97}
98
99func (s *testBinLogSink) clear() {
100 s.mu.Lock()

Callers 3

testClientBinaryLogFunction · 0.80
testServerBinaryLogFunction · 0.80
TestCanceledStatusMethod · 0.80

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected