aggtrigger

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

OnDiskAgg implements a trigger to downsample base timeframe data and write to disk. Underlying data schema is expected at least - Open:float32 or float64 - High:float32 or float64 - Low:float32 or float64 - Close:float32 or float64 optionally, - Volume:one of float32, float64, or int32

Example:

triggers:
  - module: ondiskagg.so
    on: */1Min/OHLCV
    config:
      filter: "nasdaq"
      destinations:
        - 5Min
        - 15Min
        - 1H
        - 1D

destinations are downsample target time windows. Optionally, if filter is set to "nasdaq", it filters the scan data by NASDAQ market hours.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTrigger

func NewTrigger(conf map[string]interface{}) (trigger.Trigger, error)

NewTrigger returns a new on-disk aggregate trigger based on the configuration.

Types

type AggTriggerConfig

type AggTriggerConfig struct {
	Destinations []string `json:"destinations"`
	Filter       string   `json:"filter"`
}

AggTriggerConfig is the configuration for OnDiskAggTrigger you can define in marketstore's config file under triggers extension.

type OnDiskAggTrigger

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

OnDiskAggTrigger is the main trigger.

func (*OnDiskAggTrigger) Fire

func (s *OnDiskAggTrigger) Fire(keyPath string, indexes []int64)

Fire implements trigger interface.

Jump to

Keyboard shortcuts

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