Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = errors.New("stream closed")
View Source
var ErrNoFrames = errors.New("no image frames to read")
Functions ¶
func ContextMiddleware ¶
func ContextMiddleware(ctx context.Context, next http.HandlerFunc) http.HandlerFunc
ContextMiddleware replaces the request context with the given context. It can be used to set a cancellable context only for streaming endpoints since the HTTP Server will not cancel in-flight requests on shutdown.
Types ¶
type Rpicamvid ¶
type Rpicamvid struct {
// contains filtered or unexported fields
}
func (*Rpicamvid) HTTPHandler ¶
func (r *Rpicamvid) HTTPHandler(w http.ResponseWriter, req *http.Request)
HTTPHandler is an HTTP route handler that responds with an MJPEG video stream from the rpicam-vid application.
Click to show internal directories.
Click to hide internal directories.