Documentation ¶
Index ¶
- Constants
- type Broker
- type Engine
- func (e *Engine) HasProgramEnded() bool
- func (e *Engine) OnEpoch(ctx context.Context, ep types.Epoch)
- func (e *Engine) OnEpochRestore(_ context.Context, ep types.Epoch)
- func (e *Engine) TakerNotionalForParty(party types.PartyID) num.Decimal
- func (e *Engine) UpdateProgram(newProgram *types.VolumeDiscountProgram)
- func (e *Engine) VolumeDiscountFactorForParty(party types.PartyID) types.Factors
- type MarketActivityTracker
- type SnapshottedEngine
- func (e *SnapshottedEngine) GetState(k string) ([]byte, []types.StateProvider, error)
- func (e *SnapshottedEngine) Keys() []string
- func (e *SnapshottedEngine) LoadState(_ context.Context, p *types.Payload) ([]types.StateProvider, error)
- func (e *SnapshottedEngine) Namespace() types.SnapshotNamespace
- func (e *SnapshottedEngine) Stopped() bool
Constants ¶
View Source
const MaximumWindowLength uint64 = 200
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func New ¶
func New(broker Broker, marketActivityTracker MarketActivityTracker) *Engine
func (*Engine) HasProgramEnded ¶
func (*Engine) TakerNotionalForParty ¶
func (*Engine) UpdateProgram ¶
func (e *Engine) UpdateProgram(newProgram *types.VolumeDiscountProgram)
type MarketActivityTracker ¶
type SnapshottedEngine ¶
type SnapshottedEngine struct { *Engine // contains filtered or unexported fields }
func NewSnapshottedEngine ¶
func NewSnapshottedEngine(broker Broker, mat MarketActivityTracker) *SnapshottedEngine
func (*SnapshottedEngine) GetState ¶
func (e *SnapshottedEngine) GetState(k string) ([]byte, []types.StateProvider, error)
func (*SnapshottedEngine) Keys ¶
func (e *SnapshottedEngine) Keys() []string
func (*SnapshottedEngine) LoadState ¶
func (e *SnapshottedEngine) LoadState(_ context.Context, p *types.Payload) ([]types.StateProvider, error)
func (*SnapshottedEngine) Namespace ¶
func (e *SnapshottedEngine) Namespace() types.SnapshotNamespace
func (*SnapshottedEngine) Stopped ¶
func (e *SnapshottedEngine) Stopped() bool
Click to show internal directories.
Click to hide internal directories.