Documentation ¶
Index ¶
- Variables
- func Heartbeat(address string)
- func NewServer() (*RpcServer, *DataService)
- type DataService
- func (s *DataService) Init()
- func (s *DataService) ListSymbols(r *http.Request, args *ListSymbolsArgs, response *ListSymbolsResponse) (err error)
- func (s *DataService) Query(r *http.Request, reqs *MultiQueryRequest, response *MultiQueryResponse) (err error)
- func (s *DataService) Write(r *http.Request, reqs *MultiWriteRequest, response *MultiWriteResponse) (err error)
- type HeartbeatMessage
- type ListSymbolsArgs
- type ListSymbolsResponse
- type MultiQueryRequest
- type MultiQueryResponse
- type MultiWriteRequest
- type MultiWriteResponse
- type QueryRequest
- type QueryRequestBuilder
- func (b *QueryRequestBuilder) End() QueryRequest
- func (b *QueryRequestBuilder) EpochEnd(value int64) *QueryRequestBuilder
- func (b *QueryRequestBuilder) EpochStart(value int64) *QueryRequestBuilder
- func (b *QueryRequestBuilder) Functions(value []string) *QueryRequestBuilder
- func (b *QueryRequestBuilder) LimitFromStart(value bool) *QueryRequestBuilder
- func (b *QueryRequestBuilder) LimitRecordCount(value int) *QueryRequestBuilder
- type QueryResponse
- type RpcServer
- type WriteRequest
- type WriteResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var Queryable uint32 // treated as bool
Functions ¶
func NewServer ¶
func NewServer() (*RpcServer, *DataService)
Types ¶
type DataService ¶
type DataService struct{}
func (*DataService) Init ¶
func (s *DataService) Init()
func (*DataService) ListSymbols ¶
func (s *DataService) ListSymbols(r *http.Request, args *ListSymbolsArgs, response *ListSymbolsResponse) (err error)
func (*DataService) Query ¶
func (s *DataService) Query(r *http.Request, reqs *MultiQueryRequest, response *MultiQueryResponse) (err error)
func (*DataService) Write ¶
func (s *DataService) Write(r *http.Request, reqs *MultiWriteRequest, response *MultiWriteResponse) (err error)
type HeartbeatMessage ¶
type ListSymbolsArgs ¶
type ListSymbolsArgs struct{}
type ListSymbolsResponse ¶
type ListSymbolsResponse struct {
Results []string
}
type MultiQueryRequest ¶
type MultiQueryRequest struct { /* A multi-request allows for different Timeframes and record formats for each request */ Requests []QueryRequest `msgpack:"requests"` }
type MultiQueryResponse ¶
type MultiQueryResponse struct { Responses []QueryResponse `msgpack:"responses"` Version string `msgpack:"version"` // Server Version Timezone string `msgpack:"timezone"` // Server Timezone }
func (*MultiQueryResponse) ToColumnSeriesMap ¶
func (resp *MultiQueryResponse) ToColumnSeriesMap() (*io.ColumnSeriesMap, error)
ToColumnSeriesMap converts a MultiQueryResponse to a ColumnSeriesMap, returning an error if there is any issue encountered while converting.
type MultiWriteRequest ¶
type MultiWriteRequest struct { /* A multi-request allows for different Timeframes and record formats for each request */ Requests []WriteRequest `msgpack:"requests"` }
type MultiWriteResponse ¶
type MultiWriteResponse struct {
Responses []WriteResponse `msgpack:"responses"`
}
type QueryRequest ¶
type QueryRequest struct { // Note: SQL is not fully supported IsSQLStatement bool `msgpack:"is_sqlstatement"` // If this is a SQL request, Only SQLStatement is relevant SQLStatement string `msgpack:"sql_statement"` // Destination is <symbol>/<timeframe>/<attributegroup> Destination string `msgpack:"destination"` // This is not usually set, defaults to Symbol/Timeframe/AttributeGroup KeyCategory string `msgpack:"key_category,omitempty"` // Lower time predicate (i.e. index >= start) in unix epoch second EpochStart *int64 `msgpack:"epoch_start,omitempty"` // Upper time predicate (i.e. index <= end) in unix epoch second EpochEnd *int64 `msgpack:"epoch_end,omitempty"` // Number of max returned rows from lower/upper bound LimitRecordCount *int `msgpack:"limit_record_count,omitempty"` // Set to true if LimitRecordCount should be from the lower LimitFromStart *bool `msgpack:"limit_from_start,omitempty"` // Support for functions is experimental and subject to change Functions []string `msgpack:"functions,omitempty"` }
This is the parameter interface for DataService.Query method.
type QueryRequestBuilder ¶
type QueryRequestBuilder struct {
// contains filtered or unexported fields
}
QueryRequestBuilder is a builder for QueryRequest to set various parameters flexibly.
qr := NewQueryRequestBuilder("TSLA/1D/OHLCV").LimitRecourdCount(100).End()
func NewQueryRequestBuilder ¶
func NewQueryRequestBuilder(destination string) *QueryRequestBuilder
func (*QueryRequestBuilder) End ¶
func (b *QueryRequestBuilder) End() QueryRequest
func (*QueryRequestBuilder) EpochEnd ¶
func (b *QueryRequestBuilder) EpochEnd(value int64) *QueryRequestBuilder
func (*QueryRequestBuilder) EpochStart ¶
func (b *QueryRequestBuilder) EpochStart(value int64) *QueryRequestBuilder
func (*QueryRequestBuilder) Functions ¶
func (b *QueryRequestBuilder) Functions(value []string) *QueryRequestBuilder
func (*QueryRequestBuilder) LimitFromStart ¶
func (b *QueryRequestBuilder) LimitFromStart(value bool) *QueryRequestBuilder
func (*QueryRequestBuilder) LimitRecordCount ¶
func (b *QueryRequestBuilder) LimitRecordCount(value int) *QueryRequestBuilder
type QueryResponse ¶
type QueryResponse struct {
Result *io.NumpyMultiDataset `msgpack:"result"`
}
type WriteRequest ¶
type WriteRequest struct { Data *io.NumpyMultiDataset `msgpack:"dataset"` IsVariableLength bool `msgpack:"is_variable_length"` }
type WriteResponse ¶
Click to show internal directories.
Click to hide internal directories.