sse.v0: gopkg.in/gin-contrib/sse.v0 Index | Files

package sse

import "gopkg.in/gin-contrib/sse.v0"

Index

Package Files

sse-decoder.go sse-encoder.go writer.go

Constants

const ContentType = "text/event-stream"

func Encode Uses

func Encode(writer io.Writer, event Event) error

type Event Uses

type Event struct {
    Event string
    Id    string
    Retry uint
    Data  interface{}
}

func Decode Uses

func Decode(r io.Reader) ([]Event, error)

func (Event) Render Uses

func (r Event) Render(w http.ResponseWriter) error

func (Event) WriteContentType Uses

func (r Event) WriteContentType(w http.ResponseWriter)

Package sse imports 9 packages (graph) and is imported by 1 packages. Updated 2019-06-03. Refresh now. Tools for package owners.