input_ = $input; $this->output_ = $output ? $output : $input; } public function submitZipkinBatch(array $spans) { $this->send_submitZipkinBatch($spans); return $this->recv_submitZipkinBatch(); } public function send_submitZipkinBatch(array $spans) { $args = new \Jaeger\Thrift\Agent\Zipkin\ZipkinCollector_submitZipkinBatch_args(); $args->spans = $spans; $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary'); if ($bin_accel) { thrift_protocol_write_binary($this->output_, 'submitZipkinBatch', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); } else { $this->output_->writeMessageBegin('submitZipkinBatch', TMessageType::CALL, $this->seqid_); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } public function recv_submitZipkinBatch() { $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary'); if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Jaeger\Thrift\Agent\Zipkin\ZipkinCollector_submitZipkinBatch_result', $this->input_->isStrictRead()); else { $rseqid = 0; $fname = null; $mtype = 0; $this->input_->readMessageBegin($fname, $mtype, $rseqid); if ($mtype == TMessageType::EXCEPTION) { $x = new TApplicationException(); $x->read($this->input_); $this->input_->readMessageEnd(); throw $x; } $result = new \Jaeger\Thrift\Agent\Zipkin\ZipkinCollector_submitZipkinBatch_result(); $result->read($this->input_); $this->input_->readMessageEnd(); } if ($result->success !== null) { return $result->success; } throw new \Exception("submitZipkinBatch failed: unknown result"); } }