Adding stackdriver exporter

This commit is contained in:
Xuewei Zhang
2019-09-12 18:30:00 -07:00
parent 9e789b5f99
commit 0f0e5eff0f
17 changed files with 705 additions and 23 deletions
+8 -7
View File
@@ -18,6 +18,8 @@ package types
import (
"time"
"github.com/spf13/pflag"
)
// The following types are used internally in problem detector. In the future this could be the
@@ -135,15 +137,14 @@ type ProblemDaemonHandler struct {
// ExporterType is the type of the exporter.
type ExporterType string
// ExporterConfigPathMap represents configurations on all types of exporters:
// 1) Each key represents a type of exporter.
// 2) Each value represents the config file path for the exporter.
type ExporterConfigPathMap map[ExporterType]*string
// ExporterHandler represents the initialization handler for a type of exporter.
type ExporterHandler struct {
// CreateExporterOrDie initializes an exporter, panic if error occurs.
CreateExporterOrDie func(string) Exporter
CreateExporterOrDie func(CommandLineOptions) Exporter
// CmdOptionDescription explains how to configure the exporter from command line arguments.
CmdOptionDescription string
Options CommandLineOptions
}
type CommandLineOptions interface {
SetFlags(*pflag.FlagSet)
}