mtls

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PingInterval - Amount of time between in-band "pings"
	PingInterval = 2 * time.Minute
)

Functions

func MtlsConnect

func MtlsConnect(address string, port uint16) (*tls.Conn, error)

MtlsConnect - Get a TLS connection or die trying

func ReadEnvelope

func ReadEnvelope(connection *tls.Conn) (*pb.Envelope, error)

ReadEnvelope - Reads a message from the TLS connection using length prefix framing

func WriteEnvelope

func WriteEnvelope(connection *tls.Conn, envelope *pb.Envelope) error

WriteEnvelope - Writes a message to the TLS socket using length prefix framing which is a fancy way of saying we write the length of the message then the message e.g. [uint32 length|message] so the receiver can delimit messages properly

func WritePing

func WritePing(connection *tls.Conn) error

WritePing - Send a "ping" message to the server

Types

This section is empty.

Jump to

Keyboard shortcuts

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