tcp

package
v5.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Name:    "tcp",
	Timeout: 16 * time.Second,
	Mode:    monitors.DefaultIPSettings,
}

Functions

This section is empty.

Types

type Config

type Config struct {
	Name string `config:"name"`

	// check all ports if host does not contain port
	Hosts []string `config:"hosts" validate:"required"`
	Ports []uint16 `config:"ports"`

	Mode monitors.IPSettings `config:",inline"`

	Socks5 transport.ProxyConfig `config:",inline"`

	// configure tls
	TLS *outputs.TLSConfig `config:"ssl"`

	Timeout time.Duration `config:"timeout"`

	// validate connection
	SendString    string `config:"check.send"`
	ReceiveString string `config:"check.receive"`
}

func (*Config) Validate

func (c *Config) Validate() error

type ConnCheck

type ConnCheck func(net.Conn) error

func (ConnCheck) Validate

func (c ConnCheck) Validate(conn net.Conn) error

Jump to

Keyboard shortcuts

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