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 --- .../thrift/src/Protocol/JSON/PairContext.php | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 vendor/packaged/thrift/src/Protocol/JSON/PairContext.php (limited to 'vendor/packaged/thrift/src/Protocol/JSON/PairContext.php') diff --git a/vendor/packaged/thrift/src/Protocol/JSON/PairContext.php b/vendor/packaged/thrift/src/Protocol/JSON/PairContext.php new file mode 100644 index 000000000..7b353c4ad --- /dev/null +++ b/vendor/packaged/thrift/src/Protocol/JSON/PairContext.php @@ -0,0 +1,64 @@ +p_ = $p; + } + + public function write() + { + if ($this->first_) { + $this->first_ = false; + $this->colon_ = true; + } else { + $this->p_->getTransport()->write($this->colon_ ? TJSONProtocol::COLON : TJSONProtocol::COMMA); + $this->colon_ = !$this->colon_; + } + } + + public function read() + { + if ($this->first_) { + $this->first_ = false; + $this->colon_ = true; + } else { + $this->p_->readJSONSyntaxChar($this->colon_ ? TJSONProtocol::COLON : TJSONProtocol::COMMA); + $this->colon_ = !$this->colon_; + } + } + + public function escapeNum() + { + return $this->colon_; + } +} -- cgit v1.2.3