Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher interface {
Dispatch(event *ExternalEvent) error
}
Dispatcher is the event dispatcher interface
func NewDispatcher ¶
func NewDispatcher(uri string) (Dispatcher, error)
NewDispatcher create new event dispatcher
type ExternalEvent ¶
type ExternalEvent struct { Action string `json:"action"` Issue Issue `json:"issue"` Payload interface{} `json:"payload"` }
ExternalEvent structure definition
func NewExternalEvent ¶
func NewExternalEvent(action string, payload interface{}) *ExternalEvent
NewExternalEvent create an external event
func (*ExternalEvent) Marshal ¶
func (ev *ExternalEvent) Marshal() *bytes.Buffer
Marshal event to JSON data
type HTTPDispatcher ¶
type HTTPDispatcher struct {
// contains filtered or unexported fields
}
HTTPDispatcher structure
func (*HTTPDispatcher) Dispatch ¶
func (hb *HTTPDispatcher) Dispatch(event *ExternalEvent) error
Send the payload to the event broker
Click to show internal directories.
Click to hide internal directories.