github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/state/watcher/export_test.go (about)

     1  // Copyright 2017 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package watcher
     5  
     6  import (
     7  	"gopkg.in/mgo.v2"
     8  
     9  	"github.com/juju/juju/mongo"
    10  )
    11  
    12  const (
    13  	TxnWatcherStarting   = txnWatcherStarting
    14  	TxnWatcherSyncErr    = txnWatcherSyncErr
    15  	TxnWatcherCollection = txnWatcherCollection
    16  	TxnWatcherShortWait  = txnWatcherShortWait
    17  )
    18  
    19  func NewTestWatcher(changelog *mgo.Collection, iteratorFunc func() mongo.Iterator) *Watcher {
    20  	return newWatcher(changelog, iteratorFunc)
    21  }
    22  
    23  func NewTestHubWatcher(hub HubSource, clock Clock, modelUUID string, logger Logger) (*HubWatcher, <-chan struct{}) {
    24  	return newHubWatcher(hub, clock, modelUUID, logger)
    25  }