Documentation ¶
Index ¶
- Constants
- func BatchSendMetrics(urls []string, dbName string, metrics []SMetricData, debug bool) error
- func JSONRequest(client *http.Client, ctx context.Context, method httputils.THttpMethod, ...) (http.Header, jsonutils.JSONObject, error)
- func SendMetrics(urls []string, dbName string, metrics []SMetricData, debug bool) error
- type SInfluxdb
- func (db *SInfluxdb) AlterRetentionPolicy(rp SRetentionPolicy) error
- func (db *SInfluxdb) BatchWrite(data []string, precision string) error
- func (db *SInfluxdb) CreateDatabase(dbName string) error
- func (db *SInfluxdb) CreateRetentionPolicy(rp SRetentionPolicy) error
- func (db *SInfluxdb) GetDatabases() ([]string, error)
- func (db *SInfluxdb) GetQuery(sql string) ([][]dbResult, error)
- func (db *SInfluxdb) GetRetentionPolicies() ([]SRetentionPolicy, error)
- func (db *SInfluxdb) Query(sql string) ([][]dbResult, error)
- func (db *SInfluxdb) SetDatabase(dbName string) error
- func (db *SInfluxdb) SetRetentionPolicy(rp SRetentionPolicy) error
- func (db *SInfluxdb) SetTimeout(timeout time.Duration)
- func (db *SInfluxdb) Write(data string, precision string) error
- type SKeyValue
- type SMetricData
- type SRetentionPolicy
- type TKeyValuePairs
Constants ¶
View Source
const (
BATCH_SEND_SIZE = 10000
)
Variables ¶
This section is empty.
Functions ¶
func BatchSendMetrics ¶
func BatchSendMetrics(urls []string, dbName string, metrics []SMetricData, debug bool) error
func JSONRequest ¶
func SendMetrics ¶
func SendMetrics(urls []string, dbName string, metrics []SMetricData, debug bool) error
Types ¶
type SInfluxdb ¶
type SInfluxdb struct {
// contains filtered or unexported fields
}
func NewInfluxdb ¶
func NewInfluxdbWithDebug ¶
func (*SInfluxdb) AlterRetentionPolicy ¶
func (db *SInfluxdb) AlterRetentionPolicy(rp SRetentionPolicy) error
func (*SInfluxdb) BatchWrite ¶
func (*SInfluxdb) CreateDatabase ¶
func (*SInfluxdb) CreateRetentionPolicy ¶
func (db *SInfluxdb) CreateRetentionPolicy(rp SRetentionPolicy) error
func (*SInfluxdb) GetDatabases ¶
func (*SInfluxdb) GetRetentionPolicies ¶
func (db *SInfluxdb) GetRetentionPolicies() ([]SRetentionPolicy, error)
func (*SInfluxdb) SetDatabase ¶
func (*SInfluxdb) SetRetentionPolicy ¶
func (db *SInfluxdb) SetRetentionPolicy(rp SRetentionPolicy) error
func (*SInfluxdb) SetTimeout ¶
type SMetricData ¶
type SMetricData struct { Name string Tags TKeyValuePairs Metrics TKeyValuePairs Timestamp time.Time }
func (*SMetricData) Line ¶
func (m *SMetricData) Line() string
type SRetentionPolicy ¶
type SRetentionPolicy struct { Name string Duration string ShardGroupDuration string ReplicaN int Default bool }
func (*SRetentionPolicy) String ¶
func (rp *SRetentionPolicy) String(dbName string) string
type TKeyValuePairs ¶
type TKeyValuePairs []SKeyValue
func (TKeyValuePairs) Len ¶
func (a TKeyValuePairs) Len() int
func (TKeyValuePairs) Less ¶
func (a TKeyValuePairs) Less(i, j int) bool
func (TKeyValuePairs) Swap ¶
func (a TKeyValuePairs) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.