Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
Handler provides event handling.
func NewHandler ¶
func NewHandler(opts HandlerOptions) (*Handler, error)
NewHandler creates a new Handler.
func (*Handler) RegisterUplinkEventFunc ¶
func (h *Handler) RegisterUplinkEventFunc(id uuid.UUID, f func(context.Context, integration.UplinkEvent) error)
RegisterUplinkEventFunc registers the given function to handle uplink events. Multiple functions can be registered simultaneously.
func (*Handler) ServeHTTP ¶
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP implements http.Handler.
func (*Handler) UnregisterUplinkEventFunc ¶
UnregisterUplinkEventFunc removes the function to handle uplink events.
type HandlerOptions ¶
type HandlerOptions struct { // JSON indicates if the events are in JSON format. When left to false // Protobuf is expected. JSON bool }
Click to show internal directories.
Click to hide internal directories.