conn

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2018 License: GPL-3.0, GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPortFromEnvironmentVariable

func GetPortFromEnvironmentVariable(portEnvVariable string) (int, error)

func GetResponseForMessageWithTimeout

func GetResponseForMessageWithTimeout(message *gauge_messages.Message, conn net.Conn, timeout time.Duration) (*gauge_messages.Message, error)

Sends request to plugin for a message. If response is not received for the given message within the configured timeout, an error is thrown To wait indefinitely for the response from the plugin, set timeout value as 0.

func SendProcessKillMessage added in v0.3.0

func SendProcessKillMessage(connection net.Conn)

SendProcessKillMessage sends a KillProcessRequest message through the connection.

func Write

func Write(conn net.Conn, messageBytes []byte) error

func WriteGaugeMessage

func WriteGaugeMessage(message *gauge_messages.Message, conn net.Conn) error

Types

type GaugeConnectionHandler

type GaugeConnectionHandler struct {
	// contains filtered or unexported fields
}

func NewGaugeConnectionHandler

func NewGaugeConnectionHandler(port int, messageHandler messageHandler) (*GaugeConnectionHandler, error)

func (*GaugeConnectionHandler) AcceptConnection

func (connectionHandler *GaugeConnectionHandler) AcceptConnection(connectionTimeOut time.Duration, errChannel chan error) (net.Conn, error)

func (*GaugeConnectionHandler) ConnectionPortNumber

func (connectionHandler *GaugeConnectionHandler) ConnectionPortNumber() int

func (*GaugeConnectionHandler) HandleMultipleConnections

func (connectionHandler *GaugeConnectionHandler) HandleMultipleConnections()

HandleMultipleConnections accepts multiple connections and Handler responds to incoming messages

Jump to

Keyboard shortcuts

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