util: github.com/aerokube/util/sse Index | Files

package sse

import "github.com/aerokube/util/sse"

Index

Package Files

sse.go tick.go

func Tick Uses

func Tick(broker Broker, notify func(context.Context, Broker), period time.Duration, stop chan os.Signal)

type Broker Uses

type Broker interface {
    http.Handler
    Notify(data []byte)
    HasClients() bool
}

type SseBroker Uses

type SseBroker struct {
    // contains filtered or unexported fields
}

func NewSseBroker Uses

func NewSseBroker() (broker *SseBroker)

func (*SseBroker) HasClients Uses

func (sse *SseBroker) HasClients() bool

func (*SseBroker) Notify Uses

func (sse *SseBroker) Notify(data []byte)

func (*SseBroker) ServeHTTP Uses

func (sse *SseBroker) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Package sse imports 7 packages (graph) and is imported by 1 packages. Updated 2018-11-14. Refresh now. Tools for package owners.