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 (*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
Click to show internal directories.
Click to hide internal directories.