func (c *Coordinator) WatchPStoreConfig(done <-chan struct{}) <-chan string {
	return c.coord.conn.WatchConfigFile(done)
}
WatchPStoreConfig returns the contents of the scotty config file in
returned channel. Each time the config file changes, the returned
channel emits the entire contents of the file. If the caller calls
WatchPStoreConfig before the config file is created, the returned
channel blocks until the config file is created. If the config file
already exists when the caller calls WatchPStoreConfig, the returned
channel emits the initial contents of the file immediately.

If done is non-nil, the caller can close done to signal that it wants
the watch terminated. Termination of the watch closes the returned
channel. Termination may not happen until several minutes after the
call closes the done channel.
package consul
import (
	"errors"
	"github.com/Symantec/Dominator/lib/log"
	"github.com/Symantec/scotty/lib/retry"
	"github.com/Symantec/scotty/store"
	"strings"
)
type Coordinator struct {
	coord    *coordinator
	listener func(blocked bool)
}
var (
	ErrMissing = errors.New("consul: Missing.")
)
var (
	kRetry       retry.Retry
	kCoordinator *Coordinator
)
func GetCoordinator(
	namespace string, logger log.Logger) (*Coordinator, error) {
	if strings.Contains(namespace, "/") {
		panic("namespace cannot contain slashes")
	}
	err := kRetry.Do(func() error {
		result, err := newCoordinator(namespace, logger)
		if err != nil {
			return err
		}
		kCoordinator = &Coordinator{coord: result}
		return nil
	})
	return kCoordinator, err
}
func (c *Coordinator) Lease(leaseSpanInSeconds, timeToInclude float64) (
	startTimeInclusive, endTimeExclusive float64) {
	return c.coord.Lease(leaseSpanInSeconds, timeToInclude, c.listener)
}
func (c *Coordinator) WithStateListener(
	listener func(blocked bool)) store.Coordinator {
	result := *c
	result.listener = listener
	return &result
}
func (c *Coordinator) PutPStoreConfig(value string) error {
	return c.coord.conn.PutConfigFile(value)
}
func (c *Coordinator) GetPStoreConfig() (result string, err error) {
	result, ok, _, err := c.coord.conn.getConfigFile(0)
	if err != nil {
		return
	}
	if !ok {
		err = ErrMissing
	}
	return
}