MCPcopy Create free account
hub / github.com/cortexproject/cortex / Close

Method Close

pkg/util/grpcencoding/snappy/snappy.go:70–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68}
69
70func (w writeCloser) Close() error {
71 defer func() {
72 w.writer.Reset(nil)
73 w.pool.Put(w.writer)
74 }()
75
76 if w.writer != nil {
77 return w.writer.Close()
78 }
79 return nil
80}
81
82type reader struct {
83 reader *snappy.Reader

Callers

nothing calls this directly

Calls 3

PutMethod · 0.65
CloseMethod · 0.65
ResetMethod · 0.45

Tested by

no test coverage detected