MCPcopy
hub / github.com/scality/cloudserver / write

Method write

lib/utilities/serverAccessLogger.js:133–149  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

131 }
132
133 write(data) {
134 if (this._waitingDrain) {
135 logger.error('ServerAccessLogger: dropped log entries due to backpressure');
136 return;
137 }
138
139 if (!this.stream) {
140 logger.error('ServerAccessLogger: stream unavailable');
141 return;
142 }
143
144 if (!this.stream.write(data)) {
145 logger.warn('ServerAccessLogger: backpressure buffer full');
146 this._waitingDrain = true;
147 this.stream.once('drain', () => { this._waitingDrain = false; });
148 }
149 }
150};
151
152function setServerAccessLogger(logger) {

Callers 15

createDecipherMethod · 0.80
_createEncryptedBucketFunction · 0.80
writeResponseFunction · 0.80
reportHandlerFunction · 0.80
writeResponseFunction · 0.80
logBatchDeleteObjectFunction · 0.80
logServerAccessFunction · 0.80
logCopySourceAccessFunction · 0.80
requestFunction · 0.80
receiveChannelDataFunction · 0.80

Calls 2

errorMethod · 0.80
warnMethod · 0.80

Tested by

no test coverage detected