Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventObject ¶
type EventObject interface { GetEventArgs() interface{} HasEventArgs() bool StopPropagation() bool IsParallelPropagation() bool GetTypeOfFunc() reflect.Type }
EventObject is the definition of a object responsible to make an event
type Publisher ¶
type Publisher interface {
Publish(event EventObject)
}
Publisher defines an object responsible to publish events
func NewPublisher ¶
func NewPublisher(subscriptions SubscriptionsGetter, errorCatcher errors.ErrorCatcher) Publisher
NewPublisher returns a Publisher
type Subscriptions ¶
type Subscriptions interface { SubscriptionsGetter Add(event EventObject, subscribeFunc interface{}) Remove(event EventObject, subscribeFunc interface{}) }
Subscriptions is the definition of a object responsible to store subscriptions for an event
func NewSubscriptions ¶
func NewSubscriptions(errorDefer errors.ErrorDefer) Subscriptions
NewSubscriptions returns a Subscriptions
type SubscriptionsError ¶
type SubscriptionsError interface { errors.CustomError GetErrorType() SubscriptionsErrorType }
type SubscriptionsErrorType ¶
type SubscriptionsErrorType uint8
const ( Unexpected SubscriptionsErrorType = iota BadFunctionSignature FunctionNoSubscribed )
type SubscriptionsGetter ¶ added in v1.1.0
type SubscriptionsGetter interface {
GetAlls(event EventObject) []reflect.Value
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.