From 8f3646a9c93a06f76f6abb31020fdb74b4b1fc59 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 9 Apr 2023 20:50:33 +0300 Subject: exp: jaeger tracing --- .../src/Protocol/SimpleJSON/StructContext.php | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 vendor/packaged/thrift/src/Protocol/SimpleJSON/StructContext.php (limited to 'vendor/packaged/thrift/src/Protocol/SimpleJSON/StructContext.php') diff --git a/vendor/packaged/thrift/src/Protocol/SimpleJSON/StructContext.php b/vendor/packaged/thrift/src/Protocol/SimpleJSON/StructContext.php new file mode 100644 index 000000000..38a62d1a2 --- /dev/null +++ b/vendor/packaged/thrift/src/Protocol/SimpleJSON/StructContext.php @@ -0,0 +1,52 @@ +p_ = $p; + } + + public function write() + { + if ($this->first_) { + $this->first_ = false; + $this->colon_ = true; + } else { + $this->p_->getTransport()->write( + $this->colon_ ? + TSimpleJSONProtocol::COLON : + TSimpleJSONProtocol::COMMA + ); + $this->colon_ = !$this->colon_; + } + } +} -- cgit v1.2.3