Documentation
¶
Overview ¶
Package httpfstream provides HTTP handlers for simultaneous streaming uploads and downloads of files
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrWriterConflict = errors.New("path already has an active writer")
ErrWriterConflict indicates that the requested path is currently being written by another writer. A path may have at most one active writer.
Functions ¶
func Follow ¶
func Follow(u *url.URL) (io.ReadCloser, error)
Follow opens a WebSocket to the file at the given URL (which must be handled by httpfstream's HTTP handler) and returns the file's contents. The io.ReadCloser continues to return data (blocking as needed) if, and as long as, there is an active writer to the file.
func OpenAppend ¶
func OpenAppend(u *url.URL) (io.WriteCloser, error)
OpenAppend opens a WebSocket to the file at the given URL (which must point be handled by httpfstream's HTTP handler) and returns an io.WriteCloser that writes (via the WebSocket) to that file.
Types ¶
type Handler ¶
func (Handler) Append ¶
func (h Handler) Append(w http.ResponseWriter, r *http.Request)
Append handles APPEND requests and appends data to a file.
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
httpfstream-append
command
|
|
httpfstream-follow
command
|
|
httpfstream-server
command
|