websocket

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Source)

func WithChannelBuffer

func WithChannelBuffer(size int) Option

func WithDialTimeout

func WithDialTimeout(d time.Duration) Option

func WithLogger

func WithLogger(logger *zap.Logger) Option

func WithMaxReconnectDelay

func WithMaxReconnectDelay(d time.Duration) Option

func WithReadLimit

func WithReadLimit(limit int64) Option

func WithReconnectDelay

func WithReconnectDelay(d time.Duration) Option

WithReconnectDelay sets the first backoff after a dropped connection.

type Source

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

func NewSource

func NewSource(uri string, opts ...Option) (*Source, error)

func (*Source) Close

func (s *Source) Close() error

func (*Source) Commit

func (s *Source) Commit() error

func (*Source) Start

func (s *Source) Start() error

Start dials the endpoint. Unlike the Python source, which connects lazily inside stream(), a bad uri or an unreachable server is reported here rather than after the pipeline is running.

func (*Source) Stream

func (s *Source) Stream() <-chan []core.Message

Jump to

Keyboard shortcuts

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