sse

package
v3.1.1-0...-90097f9 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusConnectionFailed = iota
	StatusUnderlyingClientInUse
	StatusFirstEventOk
	StatusDisconnected
)

Status constants

Variables

This section is empty.

Functions

This section is empty.

Types

type IncomingMessage

type IncomingMessage = sse.RawEvent

IncomingMessage is an alias of sse.RawEvent

type StreamingClient

type StreamingClient interface {
	ConnectStreaming(token string, streamingStatus chan int, channelList []string, handleIncomingMessage func(IncomingMessage))
	StopStreaming()
	IsRunning() bool
}

StreamingClient interface

type StreamingClientImpl

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

StreamingClientImpl struct

func NewStreamingClient

func NewStreamingClient(cfg *conf.AdvancedConfig, logger logging.LoggerInterface, metadata dtos.Metadata, clientKey *string) *StreamingClientImpl

NewStreamingClient creates new SSE Client

func (*StreamingClientImpl) ConnectStreaming

func (s *StreamingClientImpl) ConnectStreaming(token string, streamingStatus chan int, channelList []string, handleIncomingMessage func(IncomingMessage))

ConnectStreaming connects to streaming

func (*StreamingClientImpl) IsRunning

func (s *StreamingClientImpl) IsRunning() bool

IsRunning returns true if the client is running

func (*StreamingClientImpl) StopStreaming

func (s *StreamingClientImpl) StopStreaming()

StopStreaming stops streaming

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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