Documentation
¶
Index ¶
- Constants
- type ColumnDef
- type IngestData
- type IngestPayload
- type LatencyStat
- type Query
- type QueryInfo
- type QueryResult
- type QueryStat
- type SQLRequest
- type StreamDef
- type ThroughputStat
- type TimeplusClient
- func (s *TimeplusClient) CreateStream(streamDef StreamDef) error
- func (s *TimeplusClient) CreateView(view View) error
- func (s *TimeplusClient) DeleteStream(streamName string) error
- func (s *TimeplusClient) ExistStream(name string) bool
- func (s *TimeplusClient) ExistView(name string) bool
- func (s *TimeplusClient) GetStream(name string) (*StreamDef, error)
- func (s *TimeplusClient) InsertData(data *IngestPayload) error
- func (s *TimeplusClient) ListStream() ([]StreamDef, error)
- func (s *TimeplusClient) ListView() ([]View, error)
- func (s *TimeplusClient) QueryStream(sql string) (rxgo.Observable, *QueryInfo, error)
- type TimeplusLowLevelClient
- type View
Constants ¶
View Source
const APIVersion = "v1beta1"
View Source
const TimeFormat = "2006-01-02 15:04:05.000"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IngestData ¶
type IngestPayload ¶
type IngestPayload struct { Data IngestData `json:"data"` Stream string `json:"stream"` }
type LatencyStat ¶
type QueryInfo ¶
type QueryInfo struct { ID string `json:"id"` Name string `json:"name"` SQL string `json:"sql"` Description string `json:"description"` Tags []string `json:"tags"` Stat QueryStat `json:"stat"` StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` Duration int64 `json:"duration"` ResponseTime int64 `json:"response_time"` Status string `json:"status"` Message string `json:"message"` Result QueryResult `json:"result"` }
type QueryResult ¶
type QueryResult struct { Header []ColumnDef `json:"header"` Data [][]interface{} `json:"data"` }
type QueryStat ¶
type QueryStat struct { Count int `json:"count"` Latency LatencyStat `json:"latency"` Throughput ThroughputStat `json:"throughput"` }
type SQLRequest ¶
type StreamDef ¶
type StreamDef struct { Name string `json:"name"` Columns []ColumnDef `json:"columns"` EventTimeColumn string `json:"event_time_column,omitempty"` EventTimeZone string `json:"event_time_timezone,omitempty"` TTLExpression string `json:"ttl_expression,omitempty"` LogStoreRetentionBytes int `json:"logstore_retention_bytes,omitempty"` LogStoreRetentionMS int `json:"logstore_retention_ms,omitempty"` }
type ThroughputStat ¶
type ThroughputStat struct {
Value float32 `json:"value"`
}
type TimeplusClient ¶
type TimeplusClient struct {
// contains filtered or unexported fields
}
func NewCientWithHttpConfig ¶
func NewCientWithHttpConfig(address string, tenant string, apikey string, config *utils.HTTPClientConfig) *TimeplusClient
func (*TimeplusClient) CreateStream ¶
func (s *TimeplusClient) CreateStream(streamDef StreamDef) error
func (*TimeplusClient) CreateView ¶
func (s *TimeplusClient) CreateView(view View) error
func (*TimeplusClient) DeleteStream ¶
func (s *TimeplusClient) DeleteStream(streamName string) error
func (*TimeplusClient) ExistStream ¶
func (s *TimeplusClient) ExistStream(name string) bool
func (*TimeplusClient) ExistView ¶
func (s *TimeplusClient) ExistView(name string) bool
func (*TimeplusClient) GetStream ¶
func (s *TimeplusClient) GetStream(name string) (*StreamDef, error)
func (*TimeplusClient) InsertData ¶
func (s *TimeplusClient) InsertData(data *IngestPayload) error
func (*TimeplusClient) ListStream ¶
func (s *TimeplusClient) ListStream() ([]StreamDef, error)
func (*TimeplusClient) ListView ¶
func (s *TimeplusClient) ListView() ([]View, error)
func (*TimeplusClient) QueryStream ¶
func (s *TimeplusClient) QueryStream(sql string) (rxgo.Observable, *QueryInfo, error)
type TimeplusLowLevelClient ¶
type TimeplusLowLevelClient struct {
// contains filtered or unexported fields
}
func NewLowLevelCient ¶
func NewLowLevelCient(address string) *TimeplusLowLevelClient
func (*TimeplusLowLevelClient) InsertData ¶
func (s *TimeplusLowLevelClient) InsertData(data *IngestPayload) error
Click to show internal directories.
Click to hide internal directories.