예제 #1
0
파일: Metric.php 프로젝트: vend/phanglia
 /**
  * @param int $type See Ganglia::TYPE_*
  * @return Packer
  */
 protected function getPacker($type)
 {
     $packer = new Packer();
     $packer->uint32($type);
     // Packet type (metadata or value)
     $packer->string($this->host);
     // Host name
     $packer->string($this->name);
     // Metric name
     $packer->uint32((int) $this->spoof);
     // Spoofing enabled?
     return $packer;
 }