server

package
v0.0.0-...-9b60763 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigCheckedAt time.Time
)

Functions

func MetricsToPB

func MetricsToPB(metrics map[string]*types.ClusterMetric) *pb.GetMetricsResponse

func NewGRPCServer

func NewGRPCServer(s *Server) *grpc.Server

Types

type MetricConfig

type MetricConfig struct {
	Name         string  `yaml:"name"`
	DeviceLabel  string  `yaml:"device_label"`
	DevicePrefix string  `yaml:"device_prefix"`
	QueryString  string  `yaml:"query_string"`
	Scale        float64 `yaml:"scale"`
}

type Server

type Server struct {
	ListenAddr       string
	PrometheusServer string
	ConfigFile       string
	// contains filtered or unexported fields
}

func NewServer

func NewServer(listenAddr, promServer, cfgFile string) *Server

func (*Server) GetMetrics

func (s *Server) GetMetrics(ctx context.Context, req *pb.GetMetricsRequest) (*pb.GetMetricsResponse, error)

func (*Server) Start

func (s *Server) Start() error

func (*Server) Watch

Jump to

Keyboard shortcuts

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