delegates

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetDelegate

func SetDelegate(delegate Delegate)

SetDelegate by delegate name

Types

type AbstractDelegate

type AbstractDelegate struct {
	widgets.AbstractStrategyWidget
}

AbstractDelegate abstract component of visotor

type DefaultDelegatesFactory

type DefaultDelegatesFactory interface {
	Get(name string) Delegate
	Set(Delegate)
	GetAll() []Delegate
}

DefaultDelegatesFactory default factory of delegates

func GetDefaultDelegatesChain

func GetDefaultDelegatesChain() DefaultDelegatesFactory

GetDefaultDelegatesChain for each controllers default delegate

type Delegate

type Delegate interface {
	widgets.PatternWidget
	Execute(event events.Event) events.Event
}

Delegate interface

func GetDelegate

func GetDelegate(name string) Delegate

GetDelegate by delegate name

func NewStdMQDelegate

func NewStdMQDelegate(topicCategory string, delegateTopic string, delegateRoutingKey string, matchPattern string) Delegate

NewStdMQDelegate new mq delegate

type DelegateOperator

type DelegateOperator interface {
	AttachDelegate(delegate Delegate) bool
	RemoveDelegate(name string) bool
	GetDelegates(string) []Delegate
	InitializeDelegates(from string)
}

DelegateOperator interface for controller operation

type DelegatesChain

type DelegatesChain struct {
	widgets.AbstractStrategyWidget
	// contains filtered or unexported fields
}

DelegatesChain responsibility chain of delegates

func NewDelegatesChain

func NewDelegatesChain(name string, matchPattern string) *DelegatesChain

NewDelegatesChain responsibility chain of delegates

func (*DelegatesChain) AttachDelegate

func (c *DelegatesChain) AttachDelegate(delegate Delegate) bool

AttachDelegate on delegate responsibility chain

func (*DelegatesChain) GetDelegates

func (c *DelegatesChain) GetDelegates(pattern string) []Delegate

GetDelegates of observer responsibility chain

func (*DelegatesChain) InitializeDelegates

func (c *DelegatesChain) InitializeDelegates(from string)

InitializeDelegates called from controller analyzement on loading

func (*DelegatesChain) LoadStrategies

func (c *DelegatesChain) LoadStrategies(strategies []string)

LoadStrategies for controller handlers

func (*DelegatesChain) RemoveDelegate

func (c *DelegatesChain) RemoveDelegate(name string) bool

RemoveDelegate on delegate responsibility chain

type DelegatesResponsibilityChain

type DelegatesResponsibilityChain interface {
	AttachDelegate(delegate Delegate) bool
	GetDelegates(string) []Delegate
}

DelegatesResponsibilityChain

type DelegatesStrategy

type DelegatesStrategy interface {
	Delegates() []Delegate
}

DelegatesStrategy interface of visitors strategy

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL