conn

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 11 Imported by: 38

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) error

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