converter

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 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   kengine.AdminConfig    `json:"admin,omitempty"`
	Storage Storage                `json:"storage"`
	Apps    map[string]interface{} `json:"apps"`
	Logging kengine.Logging        `json:"logging"`
}

Config represents a kengine2 config file.

func NewConfig

func NewConfig() *Config

func (Config) GetHTTPServer

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

func (Config) GetMetricsServer

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

func (Config) GetTLSApp

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

type GlobalMiddleware

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

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

type IngressMiddleware

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

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

type IngressMiddlewareInput

type IngressMiddlewareInput struct {
	Config  *Config
	Store   *store.Store
	Ingress *v1.Ingress
	Rule    v1.IngressRule
	Path    v1.HTTPIngressPath
	Route   *kenginehttp.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