model

package
v0.0.0-...-f62d9cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GraphItem

type GraphItem struct {
	Endpoint  string            `json:"endpoint"`
	Metric    string            `json:"metric"`
	Tags      map[string]string `json:"tags"`
	Value     float64           `json:"value"`
	Timestamp int64             `json:"timestamp"`
	DsType    string            `json:"dstype"`
	Step      int               `json:"step"`
	Heartbeat int               `json:"heartbeat"`
	Min       string            `json:"min"`
	Max       string            `json:"max"`
}

DsType 即 rrd 中的 data source 的类型:GAUGE | COUNTER | DERIVE

func (*GraphItem) Checksum

func (u *GraphItem) Checksum() string

func (*GraphItem) PrimaryKey

func (u *GraphItem) PrimaryKey() string

func (*GraphItem) String

func (u *GraphItem) String() string

func (*GraphItem) UUID

func (u *GraphItem) UUID() string

type HistoryData

type HistoryData struct {
	Timestamp int64   `json:"timestamp"`
	Value     float64 `json:"value"`
}

type JudgeItem

type JudgeItem struct {
	Endpoint  string            `json:"endpoint"`
	Metric    string            `json:"metric"`
	Value     float64           `json:"value"`
	Timestamp int64             `json:"timestamp"`
	JudgeType string            `json:"judgeType"`
	Tags      map[string]string `json:"tags"`
}

func (*JudgeItem) PrimaryKey

func (u *JudgeItem) PrimaryKey() string

func (*JudgeItem) String

func (u *JudgeItem) String() string

type MetaData

type MetaData struct {
	Metric      string            `json:"metric"`
	Endpoint    string            `json:"endpoint"`
	Timestamp   int64             `json:"timestamp"`
	Step        int64             `json:"step"`
	Value       float64           `json:"value"`
	CounterType string            `json:"counterType"`
	Tags        map[string]string `json:"tags"`
}

func (*MetaData) PK

func (u *MetaData) PK() string

func (*MetaData) String

func (u *MetaData) String() string

type MetricValue

type MetricValue struct {
	Endpoint  string      `json:"endpoint"`
	Metric    string      `json:"metric"`
	Value     interface{} `json:"value"`
	Step      int64       `json:"step"`
	Type      string      `json:"counterType"`
	Tags      string      `json:"tags"`
	Timestamp int64       `json:"timestamp"`
}

func (*MetricValue) String

func (u *MetricValue) String() string

type NullRpcRequest

type NullRpcRequest struct {
}

type RpcResponse

type RpcResponse struct {
	Code int `json:"code"` // 0 success; 1 fail
}

func (*RpcResponse) String

func (u *RpcResponse) String() string

type TransferResponse

type TransferResponse struct {
	Message string
	Total   int
	Invalid int
	Latency int64
}

func (*TransferResponse) String

func (u *TransferResponse) String() string

type TsDBItem

type TsDBItem struct {
	Metric    string            `json:"metric"`
	Tags      map[string]string `json:"tags"`
	Value     float64           `json:"value"`
	Timestamp int64             `json:"timestamp"`
}

func (*TsDBItem) String

func (u *TsDBItem) String() string

func (*TsDBItem) TsDBString

func (u *TsDBItem) TsDBString() (s string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL