Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchMetricFamilies ¶
func FetchMetricFamilies( url string, ) (mfs []*dto.MetricFamily, err error)
FetchMetricFamilies retrieves metrics from the provided URL, decodes them into MetricFamily proto messages, and sends them to the provided channel. It returns after all MetricFamilies have been sent.
func NewRegistry ¶
func NewRegistry() (prometheus.Registerer, prometheus.Gatherer, error)
Types ¶
type MetricBundle ¶
type MetricBundle struct { // unix UTC time in nanoseconds // note that while nanosecond resolution is not needed or likely to be accurate // it is the easiest way to pass time around as single value in go // time.Now().UnixNano() BundleTimestamp int64 `protobuf:"varint,1,opt,name=bundle_timestamp" json:"bundle_timestamp,omitempty"` Families []*dto.MetricFamily `protobuf:"bytes,2,rep,name=families" json:"families,omitempty"` }
definition of a simple array proto
func (*MetricBundle) ProtoMessage ¶
func (*MetricBundle) ProtoMessage()
func (*MetricBundle) Reset ¶
func (m *MetricBundle) Reset()
func (*MetricBundle) String ¶
func (m *MetricBundle) String() string
type Promiot ¶
type Promiot struct { Gatherer prometheus.Gatherer PublishDelay int64 // contains filtered or unexported fields }
func NewPromiot ¶
func (*Promiot) MustRegister ¶
func (p *Promiot) MustRegister(cs ...prometheus.Collector)
type PromiotReceiver ¶
type PromiotReceiver struct {
// contains filtered or unexported fields
}
PromiotReceiver combines pubsub topic with a gatherable cache of received metrics implements the prometheus.Gatherer interface
func NewPromiotReceiver ¶
func NewPromiotReceiver(project string, subscription string) *PromiotReceiver
NewPromiotReceiver - constructor
func (*PromiotReceiver) Gather ¶
func (r *PromiotReceiver) Gather() ([]*dto.MetricFamily, error)
Gather : Implement the prometheus "Gather" interface
func (*PromiotReceiver) Receive ¶
func (r *PromiotReceiver) Receive()
Receive - uses cloud pubsub streaming pull to receive metrics over telemetry and decode
Click to show internal directories.
Click to hide internal directories.