jamiekieranmartin / ayo

ayo is a minimal input/output "turnout" proxy for common interfaces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ayo

Spin up an io interface in a pinch.

ayo is a minimal input/output proxy for common interfaces. It manages connections for inputs and relays messages to outputs in a "turnout" concurrency pattern.

Install

go get github.com/jamiekieranmartin/ayo

Otherwise you can download the binary from Releases

Usage

CLI

ayo -config "./config.toml"

Golang SDK

// make new ayo instance
io, err := ayo.New(*config)
if err != nil {
	panic(err)
}

// listen and serve io interfaces
err = io.ListenAndServe()
if err != nil {
	panic(err)
}

CLI flags

-config

Path a custom configuration file. Defaults to ./config.toml.

ayo -config "./path/to/my/file.toml"

TOML Configuration

# Inputs

[[input.tcp]]
port="5001"

[[input.udp]]
port="5002"

[[input.http]]
port="80"

# Outputs

[[output.tcp]]
hostname="1.1.1.1"
port="6001"

[[output.udp]]
hostname="1.1.1.1"
port="6002"

[[output.http]]
uri="https://example.com"

About

ayo is a minimal input/output "turnout" proxy for common interfaces

License:MIT License


Languages

Language:Go 100.0%