surfacers

package
v0.0.0-...-b28dce8 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package surfacers is a generated protocol buffer package.

It is generated from these files:

github.com/google/cloudprober/surfacers/config.proto

It has these top-level messages:

SurfacerDef

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

View Source
var Type_name = map[int32]string{
	0: "NONE",
	1: "PROMETHEUS",
	2: "STACKDRIVER",
	3: "FILE",
}
View Source
var Type_value = map[string]int32{
	"NONE":        0,
	"PROMETHEUS":  1,
	"STACKDRIVER": 2,
	"FILE":        3,
}

Functions

This section is empty.

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 []*SurfacerDef) ([]Surfacer, error)

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

type SurfacerDef

type SurfacerDef struct {
	// This name is used for logging. If not defined, it's derived from the type.
	Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Type *Type   `protobuf:"varint,2,opt,name=type,enum=cloudprober.surfacer.Type" json:"type,omitempty"`
	// Matching surfacer specific configuration (one for each type in the above
	// enum)
	//
	// Types that are valid to be assigned to Surfacer:
	//	*SurfacerDef_PrometheusSurfacer
	//	*SurfacerDef_StackdriverSurfacer
	//	*SurfacerDef_FileSurfacer
	Surfacer         isSurfacerDef_Surfacer `protobuf_oneof:"surfacer"`
	XXX_unrecognized []byte                 `json:"-"`
}

func (*SurfacerDef) Descriptor

func (*SurfacerDef) Descriptor() ([]byte, []int)

func (*SurfacerDef) GetFileSurfacer

func (m *SurfacerDef) GetFileSurfacer() *cloudprober_surfacer_file.SurfacerConf

func (*SurfacerDef) GetName

func (m *SurfacerDef) GetName() string

func (*SurfacerDef) GetPrometheusSurfacer

func (m *SurfacerDef) GetPrometheusSurfacer() *cloudprober_surfacer_prometheus.SurfacerConf

func (*SurfacerDef) GetStackdriverSurfacer

func (m *SurfacerDef) GetStackdriverSurfacer() *cloudprober_surfacer_stackdriver.SurfacerConf

func (*SurfacerDef) GetSurfacer

func (m *SurfacerDef) GetSurfacer() isSurfacerDef_Surfacer

func (*SurfacerDef) GetType

func (m *SurfacerDef) GetType() Type

func (*SurfacerDef) ProtoMessage

func (*SurfacerDef) ProtoMessage()

func (*SurfacerDef) Reset

func (m *SurfacerDef) Reset()

func (*SurfacerDef) String

func (m *SurfacerDef) String() string

func (*SurfacerDef) XXX_OneofFuncs

func (*SurfacerDef) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

type SurfacerDef_FileSurfacer

type SurfacerDef_FileSurfacer struct {
	FileSurfacer *cloudprober_surfacer_file.SurfacerConf `protobuf:"bytes,12,opt,name=file_surfacer,json=fileSurfacer,oneof"`
}

type SurfacerDef_PrometheusSurfacer

type SurfacerDef_PrometheusSurfacer struct {
	PrometheusSurfacer *cloudprober_surfacer_prometheus.SurfacerConf `protobuf:"bytes,10,opt,name=prometheus_surfacer,json=prometheusSurfacer,oneof"`
}

type SurfacerDef_StackdriverSurfacer

type SurfacerDef_StackdriverSurfacer struct {
	StackdriverSurfacer *cloudprober_surfacer_stackdriver.SurfacerConf `protobuf:"bytes,11,opt,name=stackdriver_surfacer,json=stackdriverSurfacer,oneof"`
}

type Type

type Type int32

Enumeration for each type of surfacer we can parse and create

const (
	Type_NONE        Type = 0
	Type_PROMETHEUS  Type = 1
	Type_STACKDRIVER Type = 2
	Type_FILE        Type = 3
)

func (Type) Enum

func (x Type) Enum() *Type

func (Type) EnumDescriptor

func (Type) EnumDescriptor() ([]byte, []int)

func (Type) String

func (x Type) String() string

func (*Type) UnmarshalJSON

func (x *Type) UnmarshalJSON(data []byte) error

Directories

Path Synopsis
Package file is a generated protocol buffer package.
Package file is a generated protocol buffer package.
Package prometheus is a generated protocol buffer package.
Package prometheus is a generated protocol buffer package.
Package stackdriver is a generated protocol buffer package.
Package stackdriver is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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