pipe

package
v4.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package pipe provides a pipe-based [relay.Relay] implementation that communicates with a child process over standard streams (STDIN/STDOUT).

On Windows, prefer TCP sockets via the socket package for better reliability. A pipe relay closes automatically when the underlying process exits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Relay

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

Relay ... PipeRelay communicate with underlying process using standard streams (STDIN, STDOUT). Attention, use TCP alternative for Windows as more reliable option. This relay closes automatically with the process.

func NewPipeRelay

func NewPipeRelay(in io.ReadCloser, out io.WriteCloser) *Relay

NewPipeRelay creates new pipe based data relay.

func (*Relay) Close

func (rl *Relay) Close() error

Close the connection

func (*Relay) Receive

func (rl *Relay) Receive(frame *frame.Frame) error

func (*Relay) Send

func (rl *Relay) Send(frame *frame.Frame) error

Send signed (prefixed) data to underlying process.

Jump to

Keyboard shortcuts

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