stream

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close() error

Close gracefully closes all streams

func Deregister added in v1.7.0

func Deregister(stream string) (err error)

Deregister a handler for a given stream, Alpaca or Polygon.

func Register

func Register(stream string, handler func(msg interface{})) (err error)

Register a handler for a given stream, Alpaca or Polygon.

func SetDataStream added in v1.5.0

func SetDataStream(streamName string)

Types

type Stream

type Stream interface {
	Subscribe(key string, handler func(msg interface{})) error
	Unsubscribe(key string) error
	Close() error
}

Stream is the generic streaming interface implemented by both alpaca and polygon.

type Unified

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

Unified is the unified streaming structure combining the interfaces from polygon and alpaca.

Jump to

Keyboard shortcuts

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