caddybrotli

package
v2.1.0-unotech Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Brotli

type Brotli struct {
	Quality *int `json:"quality,omitempty"`
}

Brotli can create brotli encoders. Note that brotli is not known for great encoding performance, and its use during requests is discouraged; instead, pre-compress the content instead.

func (Brotli) AcceptEncoding

func (Brotli) AcceptEncoding() string

AcceptEncoding returns the name of the encoding as used in the Accept-Encoding request headers.

func (Brotli) CaddyModule

func (Brotli) CaddyModule() caddy.ModuleInfo

CaddyModule returns the Caddy module information.

func (Brotli) NewEncoder

func (b Brotli) NewEncoder() encode.Encoder

NewEncoder returns a new brotli writer.

func (*Brotli) UnmarshalCaddyfile

func (b *Brotli) UnmarshalCaddyfile(d *caddyfile.Dispenser) error

UnmarshalCaddyfile sets up the handler from Caddyfile tokens.

func (Brotli) Validate

func (b Brotli) Validate() error

Validate validates b's configuration.

Jump to

Keyboard shortcuts

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