streaming

package
v0.0.0-...-c1181c0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: MIT Imports: 8 Imported by: ? 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

func GetControlDataFromIssueIdList

func GetControlDataFromIssueIdList(issueIdList []string, subscribe bool) string

Types

type Client

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

func NewStreamingClient

func NewStreamingClient(httpClient *http.Client, clientId int, updatePeriod time.Duration) *Client

func (*Client) GetQuote

func (c *Client) GetQuote(issueid string) ProductQuote

func (*Client) Start

func (c *Client) Start() error

func (*Client) SubscribeQuotes

func (c *Client) SubscribeQuotes(idlist []string) error

func (*Client) UnSubscribeQuotes

func (c *Client) UnSubscribeQuotes(idlist []string) error

type DecimalValueMap

type DecimalValueMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewDecimalValueMap

func NewDecimalValueMap() *DecimalValueMap

func (*DecimalValueMap) Get

func (m *DecimalValueMap) Get(key int64) (decimal.Decimal, bool)

Get retrieves the value for a concurrent map item

func (*DecimalValueMap) Set

func (m *DecimalValueMap) Set(key int64, value decimal.Decimal)

Set adds an item to a concurrent map

type IndexMap

type IndexMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewIndexMap

func NewIndexMap() *IndexMap

func (*IndexMap) Get

func (m *IndexMap) Get(key string) (int64, bool)

Get retrieves the value for a concurrent map item

func (*IndexMap) Set

func (m *IndexMap) Set(key string, value int64)

Set adds an item to a concurrent map

type ProductQuote

type ProductQuote struct {
	IssueId   string
	FullName  string
	LastPrice decimal.Decimal
	BidPrice  decimal.Decimal
	AskPrice  decimal.Decimal
	OpenPrice decimal.Decimal
	LowPrice  decimal.Decimal
	HighPrice decimal.Decimal
	BidVolume decimal.Decimal
	AskVolume decimal.Decimal
}

type StringValueMap

type StringValueMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewStringValueMap

func NewStringValueMap() *StringValueMap

func (*StringValueMap) Get

func (m *StringValueMap) Get(key int64) (string, bool)

Get retrieves the value for a concurrent map item

func (*StringValueMap) Set

func (m *StringValueMap) Set(key int64, value string)

Set adds an item to a concurrent map

Jump to

Keyboard shortcuts

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