juju: github.com/juju/juju/worker/multiwatcher/testbacking Index | Files

package testbacking

import "github.com/juju/juju/worker/multiwatcher/testbacking"

Index

Package Files

backing.go

func EnsureModelUUID Uses

func EnsureModelUUID(modelUUID, id string) string

EnsureModelUUID is exported as it is used in other _test files.

func SplitDocID Uses

func SplitDocID(id string) (string, string, bool)

SplitDocID is exported as it is used in other _test files.

type Backing Uses

type Backing struct {
    // contains filtered or unexported fields
}

Backing is a test state AllWatcherBacking

func New Uses

func New(initial []multiwatcher.EntityInfo) *Backing

New returns a new test backing.

func (*Backing) Changed Uses

func (b *Backing) Changed(store multiwatcher.Store, change watcher.Change) error

Changed process the change event from the state base watcher.

func (*Backing) DeleteEntity Uses

func (b *Backing) DeleteEntity(id multiwatcher.EntityID)

DeleteEntity allows the test to push a delete through the test.

func (*Backing) GetAll Uses

func (b *Backing) GetAll(store multiwatcher.Store) error

GetAll does the initial population of the store.

func (*Backing) SetFetchError Uses

func (b *Backing) SetFetchError(err error)

SetFetchError queues up an error to return on the next fetch.

func (*Backing) Unwatch Uses

func (b *Backing) Unwatch(c chan<- watcher.Change)

Unwatch clears the channel for the events.

func (*Backing) UpdateEntity Uses

func (b *Backing) UpdateEntity(info multiwatcher.EntityInfo)

UpdateEntity allows the test to push an update.

func (*Backing) Watch Uses

func (b *Backing) Watch(c chan<- watcher.Change)

Watch sets up the channel for the events.

Package testbacking imports 7 packages (graph). Updated 2019-12-19. Refresh now. Tools for package owners.