* *create single time series *params *path: string, complete time series path (starts from root) *dataType: int32, data type for this time series *encoding: int32, data type for this time series *compressor: int32, compressing type for this time series *return *error: correctness of operatio
(path string, dataType TSDataType, encoding TSEncoding, compressor TSCompressionType, attributes map[string]string, tags map[string]string)
| 292 | *error: correctness of operation |
| 293 | */ |
| 294 | func (s *Session) CreateTimeseries(path string, dataType TSDataType, encoding TSEncoding, compressor TSCompressionType, attributes map[string]string, tags map[string]string) error { |
| 295 | request := rpc.TSCreateTimeseriesReq{ |
| 296 | SessionId: s.sessionId, Path: path, DataType: int32(dataType), Encoding: int32(encoding), |
| 297 | Compressor: int32(compressor), Attributes: attributes, Tags: tags, |
| 298 | } |
| 299 | status, err := s.client.CreateTimeseries(context.Background(), &request) |
| 300 | if err != nil && status == nil { |
| 301 | if s.reconnect() { |
| 302 | request.SessionId = s.sessionId |
| 303 | status, err = s.client.CreateTimeseries(context.Background(), &request) |
| 304 | } |
| 305 | } |
| 306 | if err != nil { |
| 307 | return err |
| 308 | } |
| 309 | return VerifySuccess(status) |
| 310 | } |
| 311 | |
| 312 | /* |
| 313 | *create single aligned time series |
nothing calls this directly
no test coverage detected