httpsource

package
v0.0.0-...-8942fcd Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package httpsource implements event.Source by accepting incoming HTTP requests that contain a machine.Event serialized as JSON.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPSource

type HTTPSource struct {
	// contains filtered or unexported fields
}

HTTPSource implements event.Source and http.Handler.

func New

func New() (*HTTPSource, error)

New returns an instance of HTTPSource.

func (*HTTPSource) ServeHTTP

func (h *HTTPSource) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler.

Must be hooked up to the frontend to handle incoming HTTP sent Events. See rpc.go for the URL to use.

func (*HTTPSource) Start

func (h *HTTPSource) Start(ctx context.Context) (<-chan machine.Event, error)

Start implements Source.

Jump to

Keyboard shortcuts

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