internal

package
v0.0.0-...-4d1e151 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	HttpPort         int
	UdpPort          int
	DefaultNamespace string
	DefaultSubsystem string
	MetricsFile      string
	// contains filtered or unexported fields
}

func NewApplication

func NewApplication(log *log.Logger) (*Application, error)

func (*Application) Run

func (a *Application) Run() (err error)

type HttpServer

type HttpServer struct {
	HttpPort int
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(log *log.Logger, httpPort int) (hs *HttpServer, err error)

func (*HttpServer) Run

func (hs *HttpServer) Run() (err error)

type Message

type Message struct {
	Name    string   `json:"name"`
	Labels  []string `json:"labels"`
	Command string   `json:"command"`
	Value   float64  `json:"value"`
}

type Metric

type Metric struct {
	Namespace string    `json:"namespace"`
	Subsystem string    `json:"subsystem"`
	Type      string    `json:"type"`
	Name      string    `json:"name"`
	Labels    []string  `json:"labels"`
	Help      string    `json:"help"`
	Buckets   []float64 `json:"buckets"`
	// contains filtered or unexported fields
}

func (*Metric) GetFullName

func (m *Metric) GetFullName() string

func (*Metric) HandleMessage

func (m *Metric) HandleMessage(msg Message) error

func (*Metric) Register

func (m *Metric) Register() error

func (*Metric) SetNamespace

func (m *Metric) SetNamespace(namespace string)

func (*Metric) SetSubsystem

func (m *Metric) SetSubsystem(subsystem string)

type Receiver

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

func NewReceiver

func NewReceiver(log *log.Logger, defaultNamespace string, defaultSubsystem string, udpPort int, metrics []Metric) (r *Receiver, err error)

func (*Receiver) Run

func (r *Receiver) Run(ctx context.Context) (err error)

Run starts the receiver

Jump to

Keyboard shortcuts

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