client

package
v0.0.0-...-7c4ebca Latest Latest
Warning

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

Go to latest
Published: May 25, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UnixClient = NewUnixMonitorClient("/var/tmp/monitor.sock")
	UdpClient  = NewUdpMonitorClient([4]byte{127, 0, 0, 1}, 5656)
)

Global variables setting

Functions

This section is empty.

Types

type UdpMonitorClient

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

Udp monitor client

func NewUdpMonitorClient

func NewUdpMonitorClient(ip [4]byte, port int) *UdpMonitorClient

New function

func (*UdpMonitorClient) Init

func (client *UdpMonitorClient) Init() error

Init monitor udp socket

func (*UdpMonitorClient) Send

func (client *UdpMonitorClient) Send(point string) error

Send monitor point via udp socket point string must less than 4096

func (*UdpMonitorClient) SetAddr

func (client *UdpMonitorClient) SetAddr(ip [4]byte, port int)

Set address

func (*UdpMonitorClient) Uninit

func (client *UdpMonitorClient) Uninit() error

Uninit monitor udp socket

type UnixMonitorClient

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

Unix monitor client

func NewUnixMonitorClient

func NewUnixMonitorClient(path string) *UnixMonitorClient

New function

func (*UnixMonitorClient) Init

func (client *UnixMonitorClient) Init() error

Init monitor unix socket

func (*UnixMonitorClient) Send

func (client *UnixMonitorClient) Send(point string) error

Send monitor point via unix socket point string must less than 4096

func (*UnixMonitorClient) SetAddr

func (client *UnixMonitorClient) SetAddr(path string)

Set address

func (*UnixMonitorClient) Uninit

func (client *UnixMonitorClient) Uninit() error

Uninit monitor unix socket

Jump to

Keyboard shortcuts

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