MCPcopy Index your code
hub / github.com/deepflowio/deepflow / initStatsdClient

Method initStatsdClient

server/controller/statsd/statsd.go:54–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52}
53
54func (s *StatsdMonitor) initStatsdClient() error {
55 if dfStatsdClient == nil {
56 var err error
57 dfStatsdClient, err = stats.NewUDPClient(stats.UDPConfig{
58 Addr: net.JoinHostPort(s.host, strconv.Itoa(s.port)),
59 PayloadSize: 1400,
60 })
61 if err != nil {
62 return fmt.Errorf("connect (%s:%d) stats udp server failed: %s", s.host, s.port, err.Error())
63 }
64 }
65 return nil
66}
67
68func (s *StatsdMonitor) RegisterStatsdTable(stable Statsdtable) {
69 if !s.enable {

Callers 2

RegisterStatsdTableMethod · 0.95
SendMethod · 0.95

Calls 2

ErrorMethod · 0.65
ErrorfMethod · 0.45

Tested by

no test coverage detected