tutu

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2023 License: MIT Imports: 22 Imported by: 0

README

tutu

tutu is the translation of tube or pipe in euskera: https://hiztegiak.elhuyar.eus/eu/tutu

tutu creates pipes between data streams: network connections, files, executed commands, etc.

Install

Installation using go:

go install github.com/igolaizola/tutu/cmd/tutu@latest

Usage

tutu [global_options] [[stream_options]...]

Each stream option list must start with -<N> <type> where N is an integer value specifying the stream number and type is the stream type.

See all available parameters calling help:

tutu -help

Examples

Example to pipe the standard input and output with an UDP connection:

tutu -1 stdio -2 udp -remote localhost:5050

This same example can be launched using the following config file:

# myconf.conf

# standard input/output stream
1 stdio

# UDP stream
2 udp
remote localhost:5050
tutu -config myconf.conf

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pipe

func Pipe(ctx context.Context, logger Logger, configs ...*Config) error

Pipe creates pipes between configured streams

Types

type Config

type Config struct {
	Number    int
	Type      string
	Inputs    []int
	AutoClose bool
	Delay     time.Duration
	Wait      time.Duration
	Exec      string
	Args      []string
	Hex       bool
	File      string
	EOL       bool
	Remote    string
	Source    string
	Insecure  bool
	Pub       string
	Sub       string
	Protocol  string
	DTLS      string
	DTLSState string
	Header    http.Header
	Conn      net.Conn
}

Config holds the configuration of a stream

type Logger

type Logger interface {
	Info(string)
	Debug(string)
}

Logger is an interface for logging

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

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