Documentation ¶
Index ¶
- func NewSession() consul.Session
- type FakePodStore
- func (f *FakePodStore) AllPods(podPrefix consul.PodPrefix) ([]consul.ManifestResult, time.Duration, error)
- func (f *FakePodStore) DeletePod(podPrefix consul.PodPrefix, hostname types.NodeName, podId types.PodID) (time.Duration, error)
- func (*FakePodStore) DestroyLockHolder(id string) error
- func (f *FakePodStore) GetHealth(service string, node types.NodeName) (consul.WatchResult, error)
- func (f *FakePodStore) GetServiceHealth(service string) (map[string]consul.WatchResult, error)
- func (f *FakePodStore) ListPods(podPrefix consul.PodPrefix, hostname types.NodeName) ([]consul.ManifestResult, time.Duration, error)
- func (*FakePodStore) LockHolder(key string) (string, string, error)
- func (*FakePodStore) NewHealthManager(node types.NodeName, logger logging.Logger) consul.HealthManager
- func (f *FakePodStore) NewSession(name string, renewalCh <-chan time.Time) (consul.Session, chan error, error)
- func (*FakePodStore) NewUnmanagedSession(session string, name string) consul.Session
- func (*FakePodStore) Ping() error
- func (f *FakePodStore) Pod(podPrefix consul.PodPrefix, hostname types.NodeName, podId types.PodID) (manifest.Manifest, time.Duration, error)
- func (*FakePodStore) PutHealth(res consul.WatchResult) (time.Time, time.Duration, error)
- func (f *FakePodStore) SetPod(podPrefix consul.PodPrefix, hostname types.NodeName, ...) (time.Duration, error)
- func (*FakePodStore) WatchAllPods(podPrefix consul.PodPrefix, quitChan <-chan struct{}, errChan chan<- error, ...)
- func (*FakePodStore) WatchPod(podPrefix consul.PodPrefix, nodename types.NodeName, podId types.PodID, ...)
- func (*FakePodStore) WatchPods(podPrefix consul.PodPrefix, nodename types.NodeName, quitChan <-chan struct{}, ...)
- type FakePodStoreKey
- type FakePreparer
- type PodStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSession ¶
Types ¶
type FakePodStore ¶
type FakePodStore struct {
// contains filtered or unexported fields
}
In memory consul store useful in tests. Currently does not implement the entire consul.Store interface
func NewFakePodStore ¶
func NewFakePodStore(podResults map[FakePodStoreKey]manifest.Manifest, healthResults map[string]consul.WatchResult) *FakePodStore
func (*FakePodStore) AllPods ¶
func (f *FakePodStore) AllPods(podPrefix consul.PodPrefix) ([]consul.ManifestResult, time.Duration, error)
func (*FakePodStore) DestroyLockHolder ¶
func (*FakePodStore) DestroyLockHolder(id string) error
func (*FakePodStore) GetHealth ¶
func (f *FakePodStore) GetHealth(service string, node types.NodeName) (consul.WatchResult, error)
func (*FakePodStore) GetServiceHealth ¶
func (f *FakePodStore) GetServiceHealth(service string) (map[string]consul.WatchResult, error)
func (*FakePodStore) ListPods ¶
func (f *FakePodStore) ListPods(podPrefix consul.PodPrefix, hostname types.NodeName) ([]consul.ManifestResult, time.Duration, error)
func (*FakePodStore) LockHolder ¶
func (*FakePodStore) LockHolder(key string) (string, string, error)
func (*FakePodStore) NewHealthManager ¶
func (*FakePodStore) NewHealthManager(node types.NodeName, logger logging.Logger) consul.HealthManager
func (*FakePodStore) NewSession ¶
func (*FakePodStore) NewUnmanagedSession ¶
func (*FakePodStore) NewUnmanagedSession(session string, name string) consul.Session
func (*FakePodStore) Ping ¶
func (*FakePodStore) Ping() error
func (*FakePodStore) PutHealth ¶
func (*FakePodStore) PutHealth(res consul.WatchResult) (time.Time, time.Duration, error)
func (*FakePodStore) WatchAllPods ¶
func (*FakePodStore) WatchAllPods(podPrefix consul.PodPrefix, quitChan <-chan struct{}, errChan chan<- error, podChan chan<- []consul.ManifestResult, pauseTime time.Duration)
func (*FakePodStore) WatchPod ¶
func (*FakePodStore) WatchPod(podPrefix consul.PodPrefix, nodename types.NodeName, podId types.PodID, quitChan <-chan struct{}, errChan chan<- error, podChan chan<- consul.ManifestResult)
func (*FakePodStore) WatchPods ¶
func (*FakePodStore) WatchPods(podPrefix consul.PodPrefix, nodename types.NodeName, quitChan <-chan struct{}, errChan chan<- error, podChan chan<- []consul.ManifestResult)
type FakePodStoreKey ¶
type FakePodStoreKey struct {
// contains filtered or unexported fields
}
func FakePodStoreKeyFor ¶
type FakePreparer ¶
type FakePreparer struct {
// contains filtered or unexported fields
}
func NewFakePreparer ¶
func NewFakePreparer(podStore PodStore, logger logging.Logger) *FakePreparer
func (*FakePreparer) Disable ¶
func (f *FakePreparer) Disable()
func (*FakePreparer) Enable ¶
func (f *FakePreparer) Enable()
type PodStore ¶
type PodStore interface { AllPods(podPrefix consul.PodPrefix) ([]consul.ManifestResult, time.Duration, error) SetPod(podPrefix consul.PodPrefix, nodename types.NodeName, manifest manifest.Manifest) (time.Duration, error) DeletePod(podPrefix consul.PodPrefix, nodename types.NodeName, podId types.PodID) (time.Duration, error) }
Click to show internal directories.
Click to hide internal directories.