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

Method Reset

internal/channelz/funcs.go:216–218  ·  view source on GitHub ↗

Reset resets the generated ID back to zero. Should only be used at initialization or by tests sensitive to the ID number.

()

Source from the content-addressed store, hash-verified

214// Reset resets the generated ID back to zero. Should only be used at
215// initialization or by tests sensitive to the ID number.
216func (i *IDGenerator) Reset() {
217 atomic.StoreInt64(&i.id, 0)
218}
219
220func (i *IDGenerator) genID() int64 {
221 return atomic.AddInt64(&i.id, 1)

Callers 3

writeHeaderMethod · 0.45
processDataMethod · 0.45

Calls

no outgoing calls

Tested by 1