MCPcopy
hub / github.com/NVIDIA/aistore / WriteAt

Method WriteAt

memsys/iosgl.go:245–253  ·  view source on GitHub ↗

NOTE assert and use with caution.

(p []byte, off int64)

Source from the content-addressed store, hash-verified

243
244// NOTE assert and use with caution.
245func (z *SGL) WriteAt(p []byte, off int64) (n int, err error) {
246 debug.Assert(z.woff >= off+int64(len(p)))
247
248 prevWriteOff := z.woff
249 z.woff = off
250 n, err = z.Write(p)
251 z.woff = prevWriteOff
252 return n, err
253}
254
255// reuse already allocated SGL (compare with Reader below)
256func (z *SGL) Reset() { z.woff, z.roff = 0, 0 }

Callers 3

EncodeFunction · 0.80
emd_test.goFile · 0.80
bucketmeta_test.goFile · 0.80

Calls 2

WriteMethod · 0.95
AssertFunction · 0.92

Tested by

no test coverage detected