Documentation ¶
Index ¶
- Variables
- func DeepCopyEntity(entities interface{}, results *data.Data)
- func ExtractDatahubEntity(entities interface{}) reflect.StructField
- func NewColumns(entities interface{}, fields []string) []string
- func NewCondition(opt Option) *common.Condition
- func NewDeleteData(entities interface{}, opts ...Option) *data.DeleteData
- func NewDeleteDataRequest(entities interface{}, opts ...Option) *data.DeleteDataRequest
- func NewFunction(function *Function) *common.Function
- func NewQueryCondition(selects []string, timeRange *TimeRange, function *Function, opts ...Option) *common.QueryCondition
- func NewReadData(entities interface{}, fields []string, timeRange *TimeRange, ...) *data.ReadData
- func NewReadDataRequest(entities interface{}, fields []string, timeRange *TimeRange, ...) *data.ReadDataRequest
- func NewRow(value reflect.Value, columns []string) *common.Row
- func NewRows(entities interface{}, columns []string) []*common.Row
- func NewSchemaMeta(entities interface{}) *schemas.SchemaMeta
- func NewTimeRange(tr *TimeRange) *common.TimeRange
- func NewTimestampProto(ts *time.Time) *timestamp.Timestamp
- func NewWriteData(entities interface{}, fields []string) *data.WriteData
- func NewWriteDataRequest(entities interface{}, fields []string) *data.WriteDataRequest
- type Client
- func (p *Client) Close() error
- func (p *Client) Create(entities interface{}, fields ...string) error
- func (p *Client) Delete(entities interface{}) error
- func (p *Client) DeleteByOpts(entity interface{}, opts ...Option) error
- func (p *Client) List(entities interface{}, opts ...Option) error
- func (p *Client) ListTS(entities interface{}, timeRange *TimeRange, function *Function, ...) error
- type Function
- type FunctionType
- type Option
- type Order
- type TimeRange
Constants ¶
This section is empty.
Variables ¶
View Source
var MetricTypeValue = map[string]common.MetricType{ "undefined": common.MetricType_METRICS_TYPE_UNDEFINED, "cpu_usage_percentage": common.MetricType_CPU_USAGE_SECONDS_PERCENTAGE, "memory_usage_bytes": common.MetricType_MEMORY_USAGE_BYTES, "power_usage_watts": common.MetricType_POWER_USAGE_WATTS, "temperature_celsius": common.MetricType_TEMPERATURE_CELSIUS, "duty_cycle": common.MetricType_DUTY_CYCLE, "current_offset": common.MetricType_CURRENT_OFFSET, "lag": common.MetricType_LAG, "latency": common.MetricType_LATENCY, "number": common.MetricType_NUMBER, "cpu_cores": common.MetricType_CPU_CORES, }
View Source
var ResourceBoundaryValue = map[string]common.ResourceBoundary{ "undefined": common.ResourceBoundary_RESOURCE_BOUNDARY_UNDEFINED, "raw": common.ResourceBoundary_RESOURCE_RAW, "upper_bound": common.ResourceBoundary_RESOURCE_UPPER_BOUND, "lower_bound": common.ResourceBoundary_RESOURCE_LOWER_BOUND, }
View Source
var ResourceQuotaValue = map[string]common.ResourceQuota{ "undefined": common.ResourceQuota_RESOURCE_QUOTA_UNDEFINED, "limit": common.ResourceQuota_RESOURCE_LIMIT, "request": common.ResourceQuota_RESOURCE_REQUEST, "initial_limit": common.ResourceQuota_RESOURCE_INITIAL_LIMIT, "initial_request": common.ResourceQuota_RESOURCE_INITIAL_REQUEST, }
View Source
var ScopeValue = map[string]schemas.Scope{ "undefined": schemas.Scope_SCOPE_UNDEFINED, "application": schemas.Scope_SCOPE_APPLICATION, "execution": schemas.Scope_SCOPE_EXECUTION, "metric": schemas.Scope_SCOPE_METRIC, "planning": schemas.Scope_SCOPE_PLANNING, "prediction": schemas.Scope_SCOPE_PREDICTION, "recommendation": schemas.Scope_SCOPE_RECOMMENDATION, "resource": schemas.Scope_SCOPE_RESOURCE, }
Functions ¶
func DeepCopyEntity ¶
func ExtractDatahubEntity ¶
func ExtractDatahubEntity(entities interface{}) reflect.StructField
func NewColumns ¶
func NewCondition ¶
func NewDeleteData ¶
func NewDeleteData(entities interface{}, opts ...Option) *data.DeleteData
func NewDeleteDataRequest ¶
func NewDeleteDataRequest(entities interface{}, opts ...Option) *data.DeleteDataRequest
func NewFunction ¶
func NewQueryCondition ¶
func NewReadData ¶
func NewReadDataRequest ¶
func NewSchemaMeta ¶
func NewSchemaMeta(entities interface{}) *schemas.SchemaMeta
func NewTimeRange ¶
func NewWriteData ¶
func NewWriteDataRequest ¶
func NewWriteDataRequest(entities interface{}, fields []string) *data.WriteDataRequest
Types ¶
type Client ¶
type Client struct { datahub.DatahubServiceClient Connection *grpc.ClientConn Address string }
func (*Client) DeleteByOpts ¶
Entity is indicator, delete by options
type FunctionType ¶
type FunctionType = int
Function type enumerator
const ( NoneFunction FunctionType = iota // Aggregation Function FunctionCount // Returns the number of non-null field values FuncDistinct // Returns the list of unique field values FuncIntegral // Returns the area under the curve for subsequent field values FunctionMean // Returns the arithmetic mean (average) of field values FunctionMedian // Returns the middle value from a sorted list of field values FunctionMode // Returns the most frequent value in a list of field values FunctionSpread // Returns the difference between the minimum and maximum field values FunctionStddev // Returns the standard deviation of field values FunctionSum // Returns the sum of field values // Selector function FunctionBottom // Returns the smallest N field values FunctionFirst // Returns the field value with the oldest timestamp FunctionLast // Returns the field value with the most recent timestamp FunctionMax // Returns the greatest field value FunctionMin // Returns the lowest field value FunctionPercentile // Returns the Nth percentile field value FunctionSample // Returns a random sample of N field values. SAMPLE() uses reservoir sampling to generate the random points FunctionTop // Returns the greatest N field values // Transformation function FuncDerivative // Returns the rate of change between subsequent field values )
Click to show internal directories.
Click to hide internal directories.