Documentation ¶
Index ¶
- type Data
- type MetricKind
- type Monitor
- func (m *Monitor) Add(data Data) error
- func (m *Monitor) Create(data Data) error
- func (m *Monitor) CreateTimeSeriesRequest(tsList []*SDK.TimeSeries) *SDK.CreateTimeSeriesRequest
- func (m *Monitor) Errorf(format string, v ...interface{})
- func (m *Monitor) FlushAll() error
- func (m *Monitor) SetCommonForceFields(fields []string)
- func (m *Monitor) SetCommonNullFields(fields []string)
- func (m *Monitor) SetCommonResource(r *Resource)
- func (m *Monitor) SetLogger(l log.Logger)
- type Resource
- type ValueType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { // for SDK.Metric MetricGroup string MetricType string Labels map[string]string // for SDK.Point Data interface{} // required EndTime time.Time // required StartTime time.Time MetricKind MetricKind ValueType ValueType Resource *Resource ForceSendFields []string NullFields []string }
Data is data struct for SDK.TimeSeries data.
func (*Data) TimeSeriesList ¶
func (d *Data) TimeSeriesList(commonResource ...*Resource) ([]*SDK.TimeSeries, error)
TimeSeriesList converts Data to TimeSeries.
type MetricKind ¶
type MetricKind string
MetricKind is wrapper struct for Monitoring MetricKind.
const ( MetricKindDefault MetricKind = "METRIC_KIND_UNSPECIFIED" MetricKindGauge MetricKind = "GAUGE" MetricKindDelta MetricKind = "DELTA" MetricKindCumulative MetricKind = "CUMULATIVE" )
MetricKind list
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor repesents stackdriver monitoring.
func NewMonitor ¶
NewMonitor returns initialized *Monitor
func (*Monitor) CreateTimeSeriesRequest ¶
func (m *Monitor) CreateTimeSeriesRequest(tsList []*SDK.TimeSeries) *SDK.CreateTimeSeriesRequest
CreateTimeSeriesRequest creates *SDK.TimeSeries from WriteData.
func (*Monitor) SetCommonForceFields ¶
SetCommonForceFields sets common FourceSendsFields.
func (*Monitor) SetCommonNullFields ¶
SetCommonNullFields sets common NullFields.
func (*Monitor) SetCommonResource ¶
SetCommonResource sets common Resource.
type Resource ¶
type Resource struct { Labels map[string]string `json:"labels,omitempty"` Type string `json:"type,omitempty"` ForceSendFields []string `json:"-"` NullFields []string `json:"-"` }
Resource is wrapper struct for SDK.MonitoredResource.
type ValueType ¶
type ValueType string
ValueType is wrapper struct for Monitoring ValueType.
const ( ValueTypeDefault ValueType = "VALUE_TYPE_UNSPECIFIED" ValueTypeBool ValueType = "BOOL" // for GAUGE ValueTypeInt64 ValueType = "INT64" ValueTypeDouble ValueType = "DOUBLE" ValueTypeString ValueType = "STRING" // for GAUGE ValueTypeDistribution ValueType = "DISTRIBUTION" ValueTypeMoney ValueType = "MONEY" )
ValueType list
Click to show internal directories.
Click to hide internal directories.