go-toolkit: github.com/splitio/go-toolkit/sse Index | Files

package sse

import "github.com/splitio/go-toolkit/sse"

Index

Package Files

sse.go

Constants

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
)

type SSEClient Uses

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

SSEClient struct

func NewSSEClient Uses

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

NewSSEClient creates new SSEClient

func (*SSEClient) Do Uses

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

Do starts streaming

func (*SSEClient) Shutdown Uses

func (l *SSEClient) Shutdown()

Shutdown stops SSE

Package sse imports 11 packages (graph) and is imported by 2 packages. Updated 2020-11-24. Refresh now. Tools for package owners.