flynn: Index | Files

package sse

import ""


Package Files

sse.go stream.go

func ServeStream Uses

func ServeStream(w http.ResponseWriter, ch interface{}, l log.Logger)

type Decoder Uses

type Decoder struct {

func NewDecoder Uses

func NewDecoder(r *bufio.Reader) *Decoder

func (*Decoder) Decode Uses

func (dec *Decoder) Decode(v interface{}) error

Decode finds the next "data" field and decodes it into v

type Error Uses

type Error string

func (Error) Error Uses

func (e Error) Error() string

type Reader Uses

type Reader struct {

func (*Reader) Read Uses

func (r *Reader) Read() ([]byte, error)

type Stream Uses

type Stream struct {
    Done chan struct{}
    // contains filtered or unexported fields

func NewStream Uses

func NewStream(w http.ResponseWriter, ch interface{}, l log.Logger) *Stream

func (*Stream) Close Uses

func (s *Stream) Close()

func (*Stream) CloseWithError Uses

func (s *Stream) CloseWithError(err error)

func (*Stream) Error Uses

func (s *Stream) Error(err error)

func (*Stream) Serve Uses

func (s *Stream) Serve()

func (*Stream) Wait Uses

func (s *Stream) Wait()

Package sse imports 11 packages (graph) and is imported by 148 packages. Updated 2019-02-23. Refresh now. Tools for package owners.