manager

package
v0.0.0-...-6165795 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2015 License: MIT Imports: 6 Imported by: 5

Documentation

Overview

Package manager defines the interfaces for managing Banks, Tickers, Markets, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bank

type Bank interface {
	RegisterBank(string, bank.Bank)
	Bank() bank.Bank
}

type Broker

type Broker interface {
	RegisterBroker(string, BrokerMaker) // Add a broker
	Brokers() []broker.Broker
	RegisterTrader(string, TraderMaker)
	Traders() []trader.Trader
	Licensee(exchange.LicenseID) trader.Trader
	SetCount(...TraderCfg)                   // Configure the Market's trader generators
	CreateTrader(string, exchange.LicenseID) // Add a trader with the specified LicenseID
	SpawnTraders()                           // Create the trader goroutines
	Retire(exchange.LicenseID)               // Revoke a LicenseID
}

type BrokerMaker

type BrokerMaker func(MiniMarket) broker.Broker

type MiniMarket

type MiniMarket interface {
	Bank
	Ticker
	exchange.Dealership
	exchange.Auctioner
	RunID() (uuid.UUID, uint64, exchange.Mode)
	Licensee(exchange.LicenseID) trader.Trader
	List() []exchange.Stock
	Status() bool
}

type Ticker

type Ticker interface {
	RegisterTicker(string, ticker.Ticker) // Add a ticker
	Tickers() []ticker.Ticker
}

type TraderCfg

type TraderCfg struct {
	Type  string
	Count uint64
}

type TraderMaker

type TraderMaker func(MiniMarket) trader.Trader

Jump to

Keyboard shortcuts

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