sse

package
v0.0.0-...-da1c305 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	// events are pushed to this channel by the main events-gathering routine
	Notifier chan []byte
	// contains filtered or unexported fields
}

Broker

func NewSSEServer

func NewSSEServer(ctx context.Context, messageOnJoin []byte) *Broker

NewSSEServer

func (*Broker) ServeHTTP

func (broker *Broker) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP

type CallBack

type CallBack func(v *core.Configuration)

CallBack represent callback that process new Flagger configuration

type Client

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

Client represent SSE client

func NewClient

func NewClient(cb CallBack) *Client

NewClient return the new instance SSE.Client

func (*Client) SetURL

func (c *Client) SetURL(URL string)

SetURL using to changing subscribing url

func (*Client) Shutdown

func (c *Client) Shutdown()

Shutdown - closes sse connection to free up the resources

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL