Documentation
¶
Index ¶
- Variables
- type Ask
- type BatchDecodeFunc
- type BatchDecoder
- type Bid
- type BookCodec
- type CandleCodec
- type CandleStore
- type DecodeKeyFunc
- type KeyGetter
- type LossyDecodeFunc
- type OrderBook
- type Proto
- type ProtoMsgFunc
- type Reader
- type SinkDecoder
- type SinkFunc
- type SinkTryFunc
- type Source
- type SymbolCodec
- type TradeCodec
- type UnitDecoder
- type WorkingState
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrBadUpgrade = errors.New("matt::chasm::source: bad upgrade") ErrBadRead = errors.New("matt::chasm::source: bad read") )
Functions ¶
This section is empty.
Types ¶
type BatchDecodeFunc ¶ added in v0.15.0
type BatchDecoder ¶ added in v0.15.0
type BookCodec ¶ added in v0.15.0
type BookCodec interface {
Proto
UnitDecoder[core.BookEvent]
}
func NewBookCodec ¶ added in v0.15.0
func NewBookCodec( endpoint endpoint, sub, unsub ProtoMsgFunc, decode LossyDecodeFunc[core.BookEvent, OrderBook], ) BookCodec
type CandleCodec ¶ added in v0.15.0
type CandleCodec interface {
Proto
SinkDecoder[core.CandleEvent]
}
func NewCandleCodec ¶ added in v0.15.0
func NewCandleCodec( endpoint endpoint, sub, unsub ProtoMsgFunc, sink SinkFunc[core.CandleEvent, CandleStore], try SinkTryFunc[core.CandleEvent, CandleStore], ) CandleCodec
type CandleStore ¶ added in v0.15.1
type CandleStore struct {
Interval [10]int64
New [10]bool
Candle [10]core.CandleEvent
// contains filtered or unexported fields
}
type DecodeKeyFunc ¶
TODO: we should be returning an error
type KeyGetter ¶
func NewKeyGetter ¶
func NewKeyGetter(online, offline, all DecodeKeyFunc, req http.Request) KeyGetter
type LossyDecodeFunc ¶ added in v0.15.0
type OrderBook ¶ added in v0.16.0
type ProtoMsgFunc ¶ added in v0.15.0
type SinkDecoder ¶ added in v0.14.1
type SinkTryFunc ¶ added in v0.15.0
type Source ¶
type Source interface {
Symbol(key core.Key) Reader[core.SymbolEvent]
Book(key core.Key) Reader[core.BookEvent]
Candle(key core.Key) Reader[core.CandleEvent]
Trade(key core.Key) Reader[core.TradeEvent]
Get() KeyGetter
}
func NewSource ¶
func NewSource( origin string, symbol SymbolCodec, book BookCodec, trade TradeCodec, candle CandleCodec, getter KeyGetter, ) Source
type SymbolCodec ¶ added in v0.15.0
type SymbolCodec interface {
Proto
BatchDecoder[core.SymbolEvent]
}
func NewSymbolCodec ¶ added in v0.15.0
func NewSymbolCodec( endpoint endpoint, sub, unsub ProtoMsgFunc, decode BatchDecodeFunc[core.SymbolEvent], ) SymbolCodec
type TradeCodec ¶ added in v0.15.0
type TradeCodec interface {
Proto
BatchDecoder[core.TradeEvent]
}
func NewTradeCodec ¶ added in v0.15.0
func NewTradeCodec( endpoint endpoint, sub, unsub ProtoMsgFunc, decode BatchDecodeFunc[core.TradeEvent], ) TradeCodec
type UnitDecoder ¶ added in v0.15.0
type WorkingState ¶ added in v0.16.0
type WorkingState interface {
OrderBook | CandleStore
}
Click to show internal directories.
Click to hide internal directories.