proxy

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package proxy provides types and handlers for managing reverse proxy applications. It defines the core interfaces and configuration for reverse proxying, with concrete runtime integration (currently using Caddy, see https://github.com/caddyserver/caddy) implemented in the internal/proxy package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadState

func LoadState() map[string]proxy.App

LoadState reads app config from apps.json. Returns an empty map if the file doesn't exist.

Types

type AppTemplateData

type AppTemplateData struct {
	Domain  string
	App     proxy.App
	LogDir  string
	LogFile string
	HomeDir string
}

type CaddyHandler

type CaddyHandler struct {
	Apps map[string]proxy.App
	// contains filtered or unexported fields
}

func Init

func Init(a map[string]proxy.App) *CaddyHandler

func (*CaddyHandler) Add

func (c *CaddyHandler) Add(apps map[string]proxy.App) error

func (*CaddyHandler) Remove

func (c *CaddyHandler) Remove(domains []string) error

func (*CaddyHandler) Restart

func (c *CaddyHandler) Restart() error

func (*CaddyHandler) Setup

func (c *CaddyHandler) Setup(apps map[string]proxy.App) error

func (*CaddyHandler) Status

func (*CaddyHandler) Stop

func (c *CaddyHandler) Stop() error

type TemplateData

type TemplateData struct {
	Apps    map[string]proxy.App
	LogDir  string
	HomeDir string
	Content string
}

Jump to

Keyboard shortcuts

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