Documentation
¶
Index ¶
- type AdminAPI
- type App
- type DockerProvisioner
- type Handler
- type Instance
- type MemberInfo
- type Orphan
- type PoolConfig
- type PoolSource
- type Registry
- func (r *Registry) AddMember(pool, id, dial string, healthy bool)
- func (r *Registry) Broadcast()
- func (r *Registry) HealthyCount(pool string) int
- func (r *Registry) HealthyDials(pool string) []string
- func (r *Registry) Inflight(pool string) *atomic.Int64
- func (r *Registry) MarkDraining(pool, id string)
- func (r *Registry) Members(pool string) []MemberInfo
- func (r *Registry) Nudge(pool string)
- func (r *Registry) RemoveMember(pool, id string)
- func (r *Registry) SetHealth(pool, id string, healthy bool)
- func (r *Registry) WaitHealthy(ctx context.Context, pool string, max time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminAPI ¶
type AdminAPI struct {
// contains filtered or unexported fields
}
func (AdminAPI) CaddyModule ¶
func (AdminAPI) CaddyModule() caddy.ModuleInfo
func (*AdminAPI) Routes ¶
func (a *AdminAPI) Routes() []caddy.AdminRoute
type App ¶
type App struct {
DefaultPool string `json:"default_pool,omitempty"`
DockerNetwork string `json:"docker_network,omitempty"`
TickInterval caddy.Duration `json:"tick_interval,omitempty"`
SpawnTimeout caddy.Duration `json:"spawn_timeout,omitempty"`
KillOnStop bool `json:"kill_on_stop,omitempty"`
Pools []PoolConfig `json:"pools,omitempty"`
// contains filtered or unexported fields
}
func (App) CaddyModule ¶
func (App) CaddyModule() caddy.ModuleInfo
type DockerProvisioner ¶
type DockerProvisioner struct {
// contains filtered or unexported fields
}
func (*DockerProvisioner) Start ¶
func (p *DockerProvisioner) Start(ctx context.Context, pc PoolConfig) (Instance, error)
moby doesn't write a response on api calls, maybe a good first issue for moby
type Handler ¶
type Handler struct {
WaitCapacity time.Duration `json:"wait_capacity,omitempty"`
// contains filtered or unexported fields
}
func (Handler) CaddyModule ¶
func (Handler) CaddyModule() caddy.ModuleInfo
type MemberInfo ¶
type PoolConfig ¶
type PoolConfig struct {
Name string `json:"name"`
Image string `json:"image"`
BackendPort int `json:"backend_port,omitempty"`
HealthPath string `json:"health_path,omitempty"`
Min int `json:"min,omitempty"`
Max int `json:"max,omitempty"`
TargetInflight int `json:"target_inflight,omitempty"`
ScaleOutCooldown time.Duration `json:"scale_out_cooldown,omitempty"`
ScaleInCooldown time.Duration `json:"scale_in_cooldown,omitempty"`
DrainGrace time.Duration `json:"drain_grace,omitempty"`
}
type PoolSource ¶
type PoolSource struct {
DefaultPool string `json:"default_pool,omitempty"`
// contains filtered or unexported fields
}
func (PoolSource) CaddyModule ¶
func (PoolSource) CaddyModule() caddy.ModuleInfo
func (*PoolSource) GetUpstreams ¶
func (p *PoolSource) GetUpstreams(r *http.Request) ([]*reverseproxy.Upstream, error)
func (*PoolSource) UnmarshalCaddyfile ¶
func (ps *PoolSource) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
these are required otherwise caddy throws out an error: module http.reverse_proxy.upstreams.limestone_pool is not a Caddyfile unmarshaler
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func (*Registry) HealthyCount ¶
func (*Registry) HealthyDials ¶
func (*Registry) MarkDraining ¶
func (*Registry) Members ¶
func (r *Registry) Members(pool string) []MemberInfo
func (*Registry) RemoveMember ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.