DurableStreams.Protocol.Plug (Streamkeeper v0.3.0)
View SourcePlug router implementing the Durable Streams HTTP protocol.
Phoenix Integration
forward "/v1/stream", DurableStreams.Protocol.PlugStandalone Usage
# In your application.ex
children = [
# ... other children
{Plug.Cowboy, scheme: :http, plug: DurableStreams.Protocol.Plug, options: [port: 4000]}
]HTTP API
| Method | Path | Purpose |
|---|---|---|
PUT | /:stream_id | Create stream |
POST | /:stream_id | Append data |
GET | /:stream_id | Read from offset |
DELETE | /:stream_id | Delete stream |
HEAD | /:stream_id | Get metadata |
Summary
Functions
Callback implementation for Plug.call/2.
Callback implementation for Plug.init/1.