2017 © Pedro Peláez
 

library mongo-oplog

image

lvinkim/mongo-oplog

  • Wednesday, July 18, 2018
  • by lvinkim
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

mongo-oplog

操作 mongodb 的 oplog, (*1)

安装

$ composer require lvinkim/mongo-oplog

用法


use Lvinkim\MongoOplog\Tail; use MongoDB\Driver\Manager; // 实现 HandlerInterface 接口 class Handler implements HandlerInterface { public function handle($document): bool { var_dump($document); return true; } } // 运行 $serverDns = 'mongodb://docker.for.mac.localhost'; $manager = new Manager($serverDns); $tail = new Tail($manager); $handler = new Handler(); $tail->pushHandler($handler); $filter = [ 'ts' => ['$gte' => new \MongoDB\BSON\Timestamp(1, time())], 'ns' => 'test.user', ]; $tail->run($filter);

The Versions

18/07 2018

dev-master

9999999-dev

  Sources   Download

The Requires

  • php >=7.1.0

 

The Development Requires

18/07 2018

v1.0

1.0.0.0

  Sources   Download

The Requires

  • php >=7.1.0

 

The Development Requires