Documentation
¶
Overview ¶
Package proxy turns the routing table into Caddy configuration. The gateway never implements local HTTP proxying itself: Caddy does.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildConfig ¶
BuildConfig renders a complete Caddy JSON config for the snapshot.
func CARootPath ¶
CARootPath is where Caddy's internal CA root certificate lives.
Types ¶
type Embedded ¶
type Embedded struct {
// contains filtered or unexported fields
}
Embedded runs Caddy inside the wtg daemon process.
type External ¶
type External struct {
AdminURL string
Client *http.Client
// contains filtered or unexported fields
}
External pushes configuration to an already running Caddy through its admin API. That Caddy instance should be dedicated to the gateway: /load replaces its whole configuration.
type Options ¶
type Options struct {
Global config.Global
StateDir string
// Embedded adds process-local settings (storage, logging, admin off)
// that must not be pushed into a user's external Caddy.
Embedded bool
}
Options controls config generation.
type Provider ¶
type Provider interface {
Name() string
// Embedded reports whether process-local settings should be generated.
Embedded() bool
Apply(ctx context.Context, cfg []byte) error
Stop() error
}
Provider applies generated configuration to a running proxy.
func NewProvider ¶
NewProvider returns the configured provider.