zabbix_svc

package module
v0.0.0-...-b8dc016 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 6 Imported by: 0

README

zabbix-svc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	Host  string `json:"host"`
	Key   string `json:"key"`
	Value string `json:"value"`
	Clock int64  `json:"clock"`
}

Metric class.

func NewMetric

func NewMetric(host, key, value string, clock ...int64) *Metric

Metric class constructor.

type Packet

type Packet struct {
	Request string    `json:"request"`
	Data    []*Metric `json:"data"`
	Clock   int64     `json:"clock"`
}

Packet class.

func NewPacket

func NewPacket(data []*Metric, clock ...int64) *Packet

Packet class cunstructor.

func (*Packet) DataLen

func (p *Packet) DataLen() []byte

DataLen Packet class method, return 8 bytes with packet length in little endian order.

type Sender

type Sender struct {
	Host string
	Port int
}

Sender class.

func NewSender

func NewSender(host string, port int) *Sender

Sender class constructor.

func (*Sender) Send

func (s *Sender) Send(packet *Packet) (res []byte, err error)

Method Sender class, send packet to zabbix.

Jump to

Keyboard shortcuts

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