MCPcopy Create free account
hub / github.com/apache/trafficserver / produce

Method produce

src/tscpp/api/TransformationPlugin.cc:393–410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393size_t
394TransformationPlugin::produce(std::string_view data)
395{
396 if (state_->type_ == REQUEST_TRANSFORMATION) {
397 state_->request_xform_output_.append(data.data(), data.length());
398 return data.size();
399 } else if (state_->type_ == CLIENT_RESPONSE_SINK_TRANSFORMATION) {
400 LOG_DEBUG("produce TransformationPlugin=%p tshttptxn=%p : This is a client response sink transform. Not producing any output",
401 this, state_->txn_);
402 return 0;
403 } else if (state_->type_ == CLIENT_REQUEST_SINK_TRANSFORMATION) {
404 LOG_DEBUG("produce TransformationPlugin=%p tshttptxn=%p : This is a client request sink transform. Not producing any output",
405 this, state_->txn_);
406 return 0;
407 } else {
408 return doProduce(data);
409 }
410}
411
412size_t
413TransformationPlugin::setOutputComplete()

Callers

nothing calls this directly

Calls 4

appendMethod · 0.45
dataMethod · 0.45
lengthMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected