qhandler_tcp

package module
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2017 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

handler-tcp

Handler to send messages via TCP

$ go run main.go                                                                                                                                                                                                                                        git:(master|✚5
2017/09/01 19:32:25.929263 [  INFO] Dispatch broadcast for Data, Done and Tick
2017/09/01 19:32:25.929431 [NOTICE]             tcp Name:loop       >> Start collector v0.2.4
2017/09/01 19:32:25.929442 [NOTICE]         tcp-out Name:out        >> Start log handler v0.1.5
2017/09/01 19:32:25.929532 [NOTICE]             tcp Name:in         >> Start collector v0.2.4
2017/09/01 19:32:25.929594 [NOTICE]             log Name:log        >> Start log handler v0.2.0
2017/09/01 19:32:25.929715 [  INFO]             tcp Name:loop       >> Listening on 0.0.0.0:10002
2017/09/01 19:32:25.929763 [  INFO]             tcp Name:in         >> Listening on 0.0.0.0:10001
2017/09/01 19:32:25.929954 [  INFO]         tcp-out Name:out        >> Connected to '127.0.0.1:10002'

When sending to the inbound TCP socket via export CNT=$((${CNT:-0}+1)) ; echo "Test${CNT}"|nc localhost 10001 the messages is routed through the agent.

  • Received by in (collector-tcp)
  • in is processed by out (handler-tcp)
  • out is received by loop (collector-tcp)
  • and the message received by loop is printed by the log (handler-log)

As the message is not accociated with a container IP, the inventory-request times out.

2017/09/01 19:32:30.031812 [ DEBUG]             tcp Name:in         >> Experience timeout for IP localhost... continue w/o Container info (SourcePath: in)
2017/09/01 19:32:30.031934 [ DEBUG]         tcp-out Name:out        >> Sending 'Test1'
2017/09/01 19:32:30.032069 [ DEBUG]             log Name:log        >> InputsMatch([loop]) != in
2017/09/01 19:32:32.035469 [ DEBUG]             tcp Name:loop       >> Experience timeout for IP 127.0.0.1... continue w/o Container info (SourcePath: loop)
2017/09/01 19:32:32.035573 [  INFO]             log Name:log        >> loop            : Test1
2017/09/01 19:32:32.035608 [ DEBUG]         tcp-out Name:out        >> InputsMatch([in]) != loop

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	*qtypes_plugin.Plugin
}

func New

func New(qChan qtypes_qchannel.QChan, cfg *config.Config, name string) (Plugin, error)

func (*Plugin) Run

func (p *Plugin) Run()

Run fetches everything from the Data channel and flushes it to stdout

Directories

Path Synopsis
cmd
tcp command

Jump to

Keyboard shortcuts

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