ingress

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 5 Imported by: 0

README

Ingress - A Easy, Powerful, Fexible Reverse Proxy

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

Installation

To install the package, run:

go install github.com/go-zoox/ingress@latest

Quick Start

# start ingress, cached in memory, default udp port: 80
sudo ingress

# start ingress with config (see conf/ingress.yml for more options)
sudo ingress -c ingress.yml

Configuration

See the configuration file.

License

GoZoox is released under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "1.0.0"

Version is the version of lighthouse

Functions

func NewProxy

func NewProxy(cfg *Config) *reverseproxy.ReverseProxy

Types

type Backend

type Backend struct {
	ServiceName string `config:"service_name"`
	ServicePort int64  `config:"service_port"`
}

type Config

type Config struct {
	Port  int64  `config:"port"`
	Rules []Rule `config:"rules"`
}

type Ingress

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

func New

func New() *Ingress

func (*Ingress) Load

func (i *Ingress) Load() error

func (*Ingress) Start

func (i *Ingress) Start()

type Path

type Path struct {
	Path    string  `config:"path"`
	Backend Backend `config:"backend"`
}

type Rule

type Rule struct {
	Host    string  `config:"host"`
	Backend Backend `config:"backend"`
	Paths   []Path  `config:"paths"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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