stdio

package
v1.0.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package stdio provides the stdio transport adapter for the proxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StdioTransport

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

StdioTransport is the inbound adapter that connects the proxy to stdin/stdout. It implements the inbound.ProxyService interface.

func NewStdioTransport

func NewStdioTransport(proxyService *service.ProxyService) *StdioTransport

NewStdioTransport creates a stdio transport adapter wrapping the given proxy service.

func (*StdioTransport) Close

func (t *StdioTransport) Close() error

Close gracefully shuts down the transport. For stdio, there are no resources to clean up.

func (*StdioTransport) Start

func (t *StdioTransport) Start(ctx context.Context) error

Start begins proxying between stdin/stdout and the upstream server. It blocks until the context is cancelled or an error occurs. This method reads from os.Stdin and writes to os.Stdout.

Jump to

Keyboard shortcuts

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