Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogStreamHandler ¶
Types ¶
type LogStreamHttpHandler ¶
type LogStreamHttpHandler struct {
// contains filtered or unexported fields
}
func (*LogStreamHttpHandler) GetStream ¶
func (h *LogStreamHttpHandler) GetStream(c *fiber.Ctx) error
Get Stream godoc @ID get-stream @Router /streams/{id} [get] @Tags logstream @Description get info about a logstream @Summary fetch a stream @Produce json @Success 200 {object} LogStreamResponse @Success 400 {object} http_common.ErrorResponse @Success 404 {object} http_common.ErrorResponse @Failure 500 {object} http_common.ErrorResponse
func (*LogStreamHttpHandler) ListStreams ¶
func (h *LogStreamHttpHandler) ListStreams(c *fiber.Ctx) error
List Streams godoc @ID list-stream @Router /streams [get] @Tags logstream @Description get all available logstreams on the server @Summary list all streams @Produce json @Success 200 {object} LogStreamsResponse @Failure 500 {object} http_common.ErrorResponse
func (*LogStreamHttpHandler) RegisterStream ¶
func (h *LogStreamHttpHandler) RegisterStream(c *fiber.Ctx) error
Register Streams godoc @ID register-stream @Router /stream/register [post] @Tags logstream @Description create a new logstream on the server so that client can subscribe to it @Summary register a logstream @Accept json @Param Payload body RegisterRequest true "information about the logstream to create" @Produce json @Success 200 {object} LogStreamWithSecretResponse @Failure 409 {object} http_common.ErrorResponse @Failure 422 {object} http_common.ErrorResponse @Failure 500 {object} http_common.ErrorResponse
func (*LogStreamHttpHandler) UnregisterStream ¶
func (h *LogStreamHttpHandler) UnregisterStream(c *fiber.Ctx) error
Unregister Streams godoc @ID unregister-stream @Router /stream/unregister [post] @Tags logstream @Description delete a logstream an close all open connection to it @Summary unregister a logstream @Accept json @Param Payload body UnregisterRequest true "information about the logstream to unregister" @Produce json @Success 200 {object} http_common.SuccessResponse @Failure 403 {object} http_common.ErrorResponse @Failure 404 {object} http_common.ErrorResponse @Failure 422 {object} http_common.ErrorResponse @Failure 500 {object} http_common.ErrorResponse
type LogStreamResponse ¶
type LogStreamsResponse ¶
type LogStreamsResponse struct {
Streams []LogStreamResponse `json:"streams"`
}