streamer

package
v0.0.0-...-f36ee27 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	Service   string                   `json:"service"`
	Command   string                   `json:"command"`
	Timestamp wsTimestamp              `json:"timestamp"`
	Content   []map[string]interface{} `json:"content"`
}

type DataCallback

type DataCallback func(symbol string, resp Data)

type QoSLevel

type QoSLevel string
const (
	QOSExpress  QoSLevel = "0" // 500 ms
	QOSRealTime QoSLevel = "1" // 750 ms
	QOSFast     QoSLevel = "2" // 1000ms
	QOSModerate QoSLevel = "3" // 1500ms
	QOSSlow     QoSLevel = "4" // 3000 ms
	QOSDelayed  QoSLevel = "5" // 3000 ms

)

type Streamer

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

func New

func New(client *tdam.Client) (*Streamer, error)

func (*Streamer) QoS

func (s *Streamer) QoS(level QoSLevel) error

func (*Streamer) Run

func (s *Streamer) Run() error

func (*Streamer) Stop

func (s *Streamer) Stop() error

func (*Streamer) Subscribe

func (s *Streamer) Subscribe(service string, subscriber string, symbols []string, cb DataCallback) error

func (*Streamer) SubscribeAcctActivity

func (s *Streamer) SubscribeAcctActivity(subscriber string, cb DataCallback) error

Jump to

Keyboard shortcuts

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