surfacers

package
v0.0.0-...-e1c190b Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package surfacers is the base package for creating Surfacer objects that are used for writing metics data to different monitoring services.

Any Surfacer that is created for writing metrics data to a monitor system should implement the below Surfacer interface and should accept metrics.EventMetrics object through a Write() call. Each new surfacer should also plug itself in through the New() method defined here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, s Surfacer)

Register allows you to register a user defined surfacer with cloudprober. Example usage:

import (
	"github.com/google/cloudprober"
	"github.com/google/cloudprober/surfacers"
)

s := &FancySurfacer{}
surfacers.Register("fancy_surfacer", s)
pr, err := cloudprober.InitFromConfig(*configFile)
if err != nil {
	log.Exitf("Error initializing cloudprober. Err: %v", err)
}

Types

type Surfacer

type Surfacer interface {
	// Function for writing a piece of metric data to a specified metric
	// store (or other location).
	Write(ctx context.Context, em *metrics.EventMetrics)
}

Surfacer is the base class for all metrics surfacing systems

func Init

func Init(sDefs []*surfacerpb.SurfacerDef) ([]Surfacer, error)

Init initializes the surfacers from the config protobufs and returns them as a list.

Directories

Path Synopsis
Package file implements "file" surfacer.
Package file implements "file" surfacer.
proto
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
Package prometheus provides a prometheus surfacer for Cloudprober.
Package prometheus provides a prometheus surfacer for Cloudprober.
proto
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.
Package stackdriver implements the Stackdriver version of the Surfacer object.
Package stackdriver implements the Stackdriver version of the Surfacer object.
proto
Package proto is a generated protocol buffer package.
Package proto is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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