Documentation ¶
Index ¶
- Variables
- type Delta
- type TectonicClient
- func (t *TectonicClient) BulkAdd(dbName string, ticks []*Delta) error
- func (t *TectonicClient) BulkInsert(ticks []*Delta, dbName string) error
- func (t *TectonicClient) Clear() (string, error)
- func (t *TectonicClient) ClearAll() (string, error)
- func (c *TectonicClient) Cmd(command string) (string, error)
- func (t *TectonicClient) Count() uint64
- func (t *TectonicClient) CountAll() uint64
- func (t *TectonicClient) Create(dbName string) error
- func (t *TectonicClient) Exists(dbName string) bool
- func (t *TectonicClient) Flush() (string, error)
- func (t *TectonicClient) FlushAll() (string, error)
- func (t *TectonicClient) Get(amount uint64) ([]*Delta, error)
- func (t *TectonicClient) GetFrom(dbName string, amount uint64) ([]Delta, error)
- func (t *TectonicClient) Help() (string, error)
- func (t *TectonicClient) Info() (string, error)
- func (t *TectonicClient) Insert(tick *Delta) error
- func (t *TectonicClient) InsertInto(dbName string, tick *Delta) error
- func (t *TectonicClient) Perf() (string, error)
- func (t *TectonicClient) Ping() (string, error)
- func (t *TectonicClient) Use(dbName string) error
- type TectonicError
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Delta ¶
type Delta struct { Timestamp float64 `json:"ts"` Price float64 `json:"price"` Size float64 `json:"size"` Seq uint32 `json:"seq"` IsTrade bool `json:"is_trade"` IsBid bool `json:"is_bid"` }
Delta : Indicates a change in the orderbook state. This delta struct also works for options and other derivative products. The field `IsBid` is overloaded to equal a call option if it is true.
type TectonicClient ¶
type TectonicClient struct {
// contains filtered or unexported fields
}
func NewTectonicClient ¶
func NewTectonicClient(host, port string) (*TectonicClient, error)
func (*TectonicClient) BulkAdd ¶
func (t *TectonicClient) BulkAdd(dbName string, ticks []*Delta) error
BulkAdd : Batch-add deltas stored in an array to the specified store
func (*TectonicClient) BulkInsert ¶
func (t *TectonicClient) BulkInsert(ticks []*Delta, dbName string) error
BulkInsert : Batch-inserts deltas stored in an array into the TectonicDB server. If you want to select what data-store you want to insert the batch into, consider using the function `BulkAddInto`.
func (*TectonicClient) Clear ¶
func (t *TectonicClient) Clear() (string, error)
Clear : Deletes everything in current store (BE CAREFUL WITH THIS METHOD)
func (*TectonicClient) ClearAll ¶
func (t *TectonicClient) ClearAll() (string, error)
ClearAll : "Drops everything in memory"
func (*TectonicClient) Count ¶
func (t *TectonicClient) Count() uint64
Count : "Count of items in current store"
func (*TectonicClient) CountAll ¶
func (t *TectonicClient) CountAll() uint64
CountAll : "Returns total count from all stores"
func (*TectonicClient) Create ¶
func (t *TectonicClient) Create(dbName string) error
Create : "Create store"
func (*TectonicClient) Exists ¶
func (t *TectonicClient) Exists(dbName string) bool
Exists : Checks if datastore exists
func (*TectonicClient) Flush ¶
func (t *TectonicClient) Flush() (string, error)
Flush : "Flush current store to disk"
func (*TectonicClient) FlushAll ¶
func (t *TectonicClient) FlushAll() (string, error)
FlushAll : "Flush everything form memory to disk"
func (*TectonicClient) Get ¶
func (t *TectonicClient) Get(amount uint64) ([]*Delta, error)
Get : "Returns `amount` items from current store"
func (*TectonicClient) GetFrom ¶
func (t *TectonicClient) GetFrom(dbName string, amount uint64) ([]Delta, error)
GetFrom : Returns items from specified store
func (*TectonicClient) Help ¶
func (t *TectonicClient) Help() (string, error)
Help : Return help string from Tectonic server
func (*TectonicClient) Info ¶
func (t *TectonicClient) Info() (string, error)
Info : From official documentation: "Returns info about table schemas"
func (*TectonicClient) Insert ¶
func (t *TectonicClient) Insert(tick *Delta) error
Insert : Inserts a single tick into the currently selected datastore
func (*TectonicClient) InsertInto ¶
func (t *TectonicClient) InsertInto(dbName string, tick *Delta) error
InsertInto : Inserts a single tick into the datastore specified by `dbName`
func (*TectonicClient) Perf ¶
func (t *TectonicClient) Perf() (string, error)
Perf : From official documentation: "Returns the answercount of items over time"
func (*TectonicClient) Ping ¶
func (t *TectonicClient) Ping() (string, error)
Ping : Sends a ping message to the TectonicDB server
func (*TectonicClient) Use ¶
func (t *TectonicClient) Use(dbName string) error
Use : "Switch the current store"
type TectonicError ¶
type TectonicError struct {
Message string
}
func NewTectonicError ¶
func NewTectonicError(message string) *TectonicError
func (*TectonicError) Error ¶
func (e *TectonicError) Error() string