MCPcopy
hub / github.com/keploy/keploy / IsZero

Method IsZero

pkg/agent/proxy/fakeconn/chunk.go:54–56  ·  view source on GitHub ↗

IsZero reports whether c is the zero Chunk value. Useful for channel consumers that receive a Chunk after a close-without-value. We intentionally exclude Dir from the predicate: Direction's zero value happens to be FromClient (`iota` starts at 0), so a genuine empty client-side chunk (e.g. a probe

()

Source from the content-addressed store, hash-verified

52// be misclassified as zero. A chunk with any of bytes, ReadAt,
53// WrittenAt, or SeqNo set is non-zero regardless of Dir.
54func (c Chunk) IsZero() bool {
55 return c.Bytes == nil && c.ReadAt.IsZero() && c.WrittenAt.IsZero() && c.SeqNo == 0
56}

Callers 15

TestChunkIsZeroFunction · 0.95
HandleFrameMethod · 0.80
resolveLastUpdatedMethod · 0.80
TestStartupMockCutoffFunction · 0.80
recordReqResTimestampsFunction · 0.80
startupMockCutoffFunction · 0.80
StoreMocksMethod · 0.80

Calls

no outgoing calls