brokers

package
v0.0.0-...-252c1c9 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PurposeOther        Purpose = 0
	PurposeEquityQuotes         = 1
	PurposeEquityInfo           = 2
	PurposeOptionQuotes         = 3
	PurposeOptionInfo           = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerEngine

type BrokerEngine struct {
	types.BrokerageServerPluginLatest
	Name string
}

func NewBrokerEngine

func NewBrokerEngine(logger log15.Logger, name string, config json.RawMessage) (*BrokerEngine, error)

type EngineList

type EngineList struct {
	Engines    map[string]*BrokerEngine
	Priorities []PriorityAndPurpose
	Fallback   string
}

func NewEngineList

func NewEngineList(engines map[string]*BrokerEngine, priorities *Priorities) *EngineList

func (*EngineList) Get

func (b *EngineList) Get(purpose Purpose) (*BrokerEngine, error)

type Priorities

type Priorities struct {
	EquityQuotes []string `json:"equity_quotes"`
	OptionQuotes []string `json:"option_quotes"`
	EquityInfo   []string `json:"equity_info"`
	OptionInfo   []string `json:"option_info"`
	Other        []string `json:"other"`
	Fallback     string
}

func (Priorities) ToList

func (p Priorities) ToList() []PriorityAndPurpose

type PriorityAndPurpose

type PriorityAndPurpose struct {
	Priority []string
	Purpose  string
}

type Purpose

type Purpose int

Jump to

Keyboard shortcuts

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