sse

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2020 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// OK It could connect streaming
	OK = iota
	// ErrorOnClientCreation Could not create client
	ErrorOnClientCreation
	// ErrorRequestPerformed Could not perform request
	ErrorRequestPerformed
	// ErrorConnectToStreaming Could not connect to streaming
	ErrorConnectToStreaming
	// ErrorReadingStream Error in streaming
	ErrorReadingStream
	// ErrorKeepAlive timedout
	ErrorKeepAlive
	// ErrorInternal Internal error for streaming
	ErrorInternal
	// ErrorUnexpected unexpected error occures
	ErrorUnexpected
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SSEClient

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

SSEClient struct

func NewSSEClient

func NewSSEClient(url string, status chan int, timeout int, logger logging.LoggerInterface) (*SSEClient, error)

NewSSEClient creates new SSEClient

func (*SSEClient) Do

func (l *SSEClient) Do(params map[string]string, callback func(e map[string]interface{}))

Do starts streaming

func (*SSEClient) Shutdown

func (l *SSEClient) Shutdown()

Shutdown stops SSE

Jump to

Keyboard shortcuts

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