Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Observable ¶
type Observable interface { data.Identifiable AddObserver(o Observer) error // register an Observer to be kept in touch NotifyObservers() error // notify observers a change occurred on content (using Observer.SignalChange) RemoveObserver(name string) error // deregister an Observer that will not be notified further }
Observable is the interface a struct must satisfy to signal internal change to observers
type Observer ¶
type Observer interface { data.Identifiable SignalChange(id string) // is called by Observable to signal an Observer a change occurred MarkAsFreed(id string) // is called by Observable to signal an Observer the content will not be used any more (decreasing the counter of uses) MarkAsDeleted(id string) // used to mark the Observable as deleted (allowing to remove the entry from the Observer internals) }
Observer is the interface a struct must satisfy to be observed by outside
Click to show internal directories.
Click to hide internal directories.