websocket

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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