netout

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package netout provides a unified network output supporting tcp, tls, udp, and unix protocols.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts *output.Options) (output.Output, error)

New creates a new network output for the protocol specified in opts.Protocol.

Types

type Output

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

Output holds options and the active connection.

func (*Output) Close

func (o *Output) Close() error

Close closes the connection. For stream-oriented protocols (tcp, tls, unix) it performs a graceful shutdown by signalling EOF and draining remaining data.

func (*Output) DialContext

func (o *Output) DialContext(ctx context.Context) error

DialContext connects to the address in opts using the protocol in opts.

func (*Output) Write

func (o *Output) Write(b []byte) (int, error)

Write writes b to the connection. A newline is appended for stream-oriented protocols (tcp, tls, unix); UDP datagrams are written as-is.

Jump to

Keyboard shortcuts

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