caddymodule

package
v0.0.0-...-2c4dbf7 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeFile = "file"
	TypeHTTP = "http"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Olaf

type Olaf struct {
	// The config source type.
	Type string `json:"type,omitempty"`

	// The path to the config.
	//
	//    Type: TypeFile => Path: filename
	//    Type: TypeHTTP => Path: url
	Path string `json:"path,omitempty"`

	// Maximum time allowed for a complete connection and request. This
	// option is useful only if Type is TypeHTTP.
	Timeout caddy.Duration `json:"timeout,omitempty"`
}

Olaf implements a handler that embeds Olaf's declarative configuration, which will be expanded later by a config adapter named `olaf`.

func (Olaf) CaddyModule

func (Olaf) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (*Olaf) ServeHTTP

func (o *Olaf) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error

ServeHTTP implements caddyhttp.MiddlewareHandler.

func (*Olaf) UnmarshalCaddyfile

func (o *Olaf) UnmarshalCaddyfile(d *caddyfile.Dispenser) (err error)

UnmarshalCaddyfile implements caddyfile.Unmarshaler. Syntax:

olaf <path>

func (*Olaf) Validate

func (o *Olaf) Validate() error

Validate implements caddy.Validator.

Jump to

Keyboard shortcuts

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