Documentation ¶
Index ¶
- func SetObserver(observer Observer)
- type AbstractObserver
- type DefaultObserversFactory
- type Observer
- type ObserverOperator
- type ObserversChain
- func (c *ObserversChain) AttachObserver(observer Observer) bool
- func (c *ObserversChain) GetObservers(pattern string) []Observer
- func (c *ObserversChain) InitializeObservers(from string)
- func (c *ObserversChain) LoadStrategies(strategies []string)
- func (c *ObserversChain) RemoveObserver(name string) bool
- type ObserversResponsibilityChain
- type ObserversStrategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AbstractObserver ¶
type AbstractObserver struct {
widgets.AbstractStrategyWidget
}
AbstractObserver abstract component of visotor
type DefaultObserversFactory ¶
type DefaultObserversFactory interface { Get(name string) Observer Set(Observer) GetAll() []Observer }
DefaultObserversFactory default factory of observers
func GetDefaultObserversChain ¶
func GetDefaultObserversChain() DefaultObserversFactory
GetDefaultObserversChain for each controllers default observer
type Observer ¶
type Observer interface { widgets.PatternWidget Observe(event events.Event) }
Observer interface
func NewOperateLogObserver ¶
func NewOperateLogObserver() Observer
NewOperateLogObserver new operation observer
type ObserverOperator ¶
type ObserverOperator interface { AttachObserver(observer Observer) bool RemoveObserver(name string) bool GetObservers(string) []Observer InitializeObservers(from string) }
ObserverOperator interface for controller operation
type ObserversChain ¶
type ObserversChain struct { widgets.AbstractStrategyWidget // contains filtered or unexported fields }
ObserversChain responsibility chain of observers
func NewObserversChain ¶
func NewObserversChain(name string, matchPattern string) *ObserversChain
NewObserversChain responsibility chain of observers
func (*ObserversChain) AttachObserver ¶
func (c *ObserversChain) AttachObserver(observer Observer) bool
AttachObserver on observer responsibility chain
func (*ObserversChain) GetObservers ¶
func (c *ObserversChain) GetObservers(pattern string) []Observer
GetObservers of observer responsibility chain
func (*ObserversChain) InitializeObservers ¶
func (c *ObserversChain) InitializeObservers(from string)
InitializeObservers called from controller analyzement on loading
func (*ObserversChain) LoadStrategies ¶
func (c *ObserversChain) LoadStrategies(strategies []string)
LoadStrategies for controller handlers
func (*ObserversChain) RemoveObserver ¶
func (c *ObserversChain) RemoveObserver(name string) bool
RemoveObserver on observer responsibility chain
type ObserversResponsibilityChain ¶
type ObserversResponsibilityChain interface { AttachObserver(observer Observer) bool GetObservers(string) []Observer }
ObserversResponsibilityChain
type ObserversStrategy ¶
type ObserversStrategy interface {
Observers() []Observer
}
ObserversStrategy interface of visitors strategy