caddy

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: AGPL-3.0 Imports: 17 Imported by: 48

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FuncMap = template.FuncMap{
		"urls":           internalURLFromServices,
		"serviceAddress": addressFromService,
	}
)

Functions

func Enable

func Enable(caddyfile string, player TemplateFunc)

Enable the caddy builder

func GetInstance

func GetInstance() *caddy.Instance

func GetPathes

func GetPathes() []string

func RegisterPluginTemplate

func RegisterPluginTemplate(fn TemplateFunc, pathes ...string) error

RegisterPluginTemplate adds a TemplateFunc to be called for each plugin

func Restart

func Restart() error

func Start

func Start() error

Types

type Caddy

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

Caddy contains the templates and functions for building a dynamic caddyfile

func Get

func Get() *Caddy

Get returns the currently enabled caddy builder

func (*Caddy) GetTemplate

func (c *Caddy) GetTemplate() *template.Template

func (*Caddy) Play

func (c *Caddy) Play() (*bytes.Buffer, error)

type TemplateFunc

type TemplateFunc func() (*bytes.Buffer, error)

TemplateFunc is a function providing a stringer

func GetTemplates

func GetTemplates() []TemplateFunc

Jump to

Keyboard shortcuts

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