tcp

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v1.1.0

func New(address string, opts ...Option) checker.Checker

New creates the TCP checker

Types

type Option

type Option func(s *TCP)

Option configures a TCP.

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout configures a timeout for maximum amount of time a dial will wait for a connection to complete

type TCP

type TCP struct {
	*checker.LogAware
	// contains filtered or unexported fields
}

TCP represents TCP checker

func (*TCP) Check

func (t *TCP) Check(ctx context.Context) bool

Check checks TCP connection

Jump to

Keyboard shortcuts

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