sse: github.com/manucorporat/sse Index | Files

package sse

import "github.com/manucorporat/sse"

Index

Package Files

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

Constants

const ContentType = "text/event-stream"

func Decode Uses

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

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 (Event) Render Uses

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

Package sse imports 9 packages (graph) and is imported by 157 packages. Updated 2016-11-06. Refresh now. Tools for package owners.