converter

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HttpServer    = "ingress_server"
	MetricsServer = "metrics_server"
)

Variables

This section is empty.

Functions

func RegisterPlugin

func RegisterPlugin(m Plugin)

Types

type Config

type Config struct {
	Admin   caddy.AdminConfig      `json:"admin,omitempty"`
	Storage Storage                `json:"storage"`
	Apps    map[string]interface{} `json:"apps"`
	Logging caddy.Logging          `json:"logging"`
}

Config represents a caddy2 config file.

func NewConfig

func NewConfig() *Config

func (Config) GetHTTPServer

func (c Config) GetHTTPServer() *caddyhttp.Server

func (Config) GetMetricsServer added in v0.1.4

func (c Config) GetMetricsServer() *caddyhttp.Server

func (Config) GetTLSApp

func (c Config) GetTLSApp() *caddytls.TLS

type GlobalMiddleware

type GlobalMiddleware interface {
	GlobalHandler(config *Config, store *store.Store) error
}

GlobalMiddleware is called with a default caddy config already configured with:

type IngressMiddleware

type IngressMiddleware interface {
	IngressHandler(input IngressMiddlewareInput) (*caddyhttp.Route, error)
}

IngressMiddleware is called for each Caddy route that is generated for a specific ingress. It allows anyone to manipulate caddy routes before sending it to caddy.

type IngressMiddlewareInput

type IngressMiddlewareInput struct {
	Config  *Config
	Store   *store.Store
	Ingress *v1.Ingress
	Rule    v1.IngressRule
	Path    v1.HTTPIngressPath
	Route   *caddyhttp.Route
}

type Plugin

type Plugin interface {
	IngressPlugin() PluginInfo
}

func Plugins

func Plugins(order []string) []Plugin

Plugins return a sorted array of plugin instances. Sort is made following these rules:

  • Plugins specified in the order slice will always go first (in the order specified in the slice)
  • A Plugin with higher priority will go before a plugin with lower priority
  • If 2 plugins have the same priority (and not in order slice), they will be sorted by plugin name

type PluginInfo

type PluginInfo struct {
	Name     string
	Priority int
	New      func() Plugin
}

type Storage

type Storage struct {
	System string `json:"module"`
	StorageValues
}

Storage represents the certmagic storage configuration.

type StorageValues

type StorageValues struct {
	Namespace string `json:"namespace"`
	LeaseId   string `json:"leaseId"`
}

StorageValues represents the config for certmagic storage providers.

Jump to

Keyboard shortcuts

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