Documentation

Overview

    Package eventmanager emits events.

    Index

    Constants

    This section is empty.

    Variables

    This section is empty.

    Functions

    This section is empty.

    Types

    type EventManager

    type EventManager struct {
    	Log I.Logger
    	// contains filtered or unexported fields
    }

      EventManager has handlers for each registered event type.

      func NewEventManager

      func NewEventManager(log I.Logger) *EventManager

        NewEventManager returns an EventManager.

        func (*EventManager) AddHandler

        func (e *EventManager) AddHandler(handler I.Handler, eventType string) error

          AddHandler takes a handler and eventType and returns an error if a handler is not provided.

          func (*EventManager) Emit

          func (e *EventManager) Emit(event S.Event) error

            Emit emits an event.

            type InvalidArgumentError

            type InvalidArgumentError struct{}

            func (InvalidArgumentError) Error

            func (e InvalidArgumentError) Error() string

            Directories

            Path Synopsis
            handlers