cmd

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Index

Constants

This section is empty.

Variables

View Source
var (
	CollectLatency = prometheus.NewGaugeVec(prometheus.GaugeOpts{
		Name: "inspector_runtime_collectlatency",
		Help: "net-exporter metrics collect latency",
	},
		[]string{"node", "probe"},
	)
)

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func WaitSignals

func WaitSignals(ctx context.Context, sgs ...os.Signal)

Types

type EServer

type EServer struct {
	proto.UnimplementedInspectorServer
	// contains filtered or unexported fields
}

func NewEServer

func NewEServer(ctx context.Context, config EventConfig) *EServer

func (*EServer) QueryMetric

func (*EServer) WatchEvent

type EventConfig

type EventConfig struct {
	Port        int      `mapstructure:"port"`
	LokiAddress string   `mapstructure:"loki_address"`
	LokiEnable  bool     `mapstructure:"loki_enable"`
	Probes      []string `mapstructure:"probes"`
}

type MServer

type MServer struct {
	// contains filtered or unexported fields
}

func NewMServer

func NewMServer(ctx context.Context, config MetricConfig) *MServer

func (*MServer) Close

func (s *MServer) Close()

Close if cache process loop exited, close the metric server will be stuck, check is first

func (*MServer) Collect

func (s *MServer) Collect(ch chan<- prometheus.Metric)

func (*MServer) Describe

func (s *MServer) Describe(ch chan<- *prometheus.Desc)

Describe get all description from probe module

type MetricConfig

type MetricConfig struct {
	Interval int      `mapstructure:"interval"`
	Port     int      `mapstructure:"port"`
	Probes   []string `mapstructure:"probes"`
	Verbose  bool     `mapstructure:"verbose"`
}

Jump to

Keyboard shortcuts

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