Documentation
¶
Index ¶
- Constants
- type Orchestrator
- func (orch *Orchestrator) CollectDeltas() []TrafficDelta
- func (orch *Orchestrator) RefreshTable(ctx context.Context, services []ProxyServiceEntry) error
- func (orch *Orchestrator) ReturnDeltas(entries []TrafficDelta)
- func (orch *Orchestrator) Services() []ServiceStatus
- func (orch *Orchestrator) Shutdown(ctx context.Context) error
- type PeerLoginOptions
- type PeerStatus
- type ProxyPeerBandwidth
- type ProxyPeerUserInfo
- type ProxyServiceEntry
- type ProxyServiceOptions
- type ProxyTablePeerEntry
- type ServiceStatus
- type TrafficDelta
Constants ¶
View Source
const DefaultAllowLoginAttempts = 50
View Source
const DefaultLoginAttemptWindow = 15 * time.Minute
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Orchestrator ¶
type Orchestrator struct {
// contains filtered or unexported fields
}
func (*Orchestrator) CollectDeltas ¶
func (orch *Orchestrator) CollectDeltas() []TrafficDelta
func (*Orchestrator) RefreshTable ¶
func (orch *Orchestrator) RefreshTable(ctx context.Context, services []ProxyServiceEntry) error
func (*Orchestrator) ReturnDeltas ¶
func (orch *Orchestrator) ReturnDeltas(entries []TrafficDelta)
func (*Orchestrator) Services ¶
func (orch *Orchestrator) Services() []ServiceStatus
type PeerLoginOptions ¶
type PeerLoginOptions struct {
MaxAttempts int `json:"max_attempts"`
AttemptWindow int `json:"attempt_window"`
}
func (*PeerLoginOptions) RateLimiter ¶
func (opts *PeerLoginOptions) RateLimiter() (quota int, window time.Duration)
type PeerStatus ¶
type ProxyPeerBandwidth ¶
type ProxyPeerUserInfo ¶
type ProxyPeerUserInfo struct {
Username string `json:"username"`
Password string `json:"password"`
Options *PeerLoginOptions `json:"options"`
}
type ProxyServiceEntry ¶
type ProxyServiceEntry struct {
ProxyServiceOptions
Peers []ProxyTablePeerEntry `json:"peers"`
}
type ProxyServiceOptions ¶
type ProxyServiceOptions struct {
BindAddr string `json:"bind_addr"`
Service string `json:"service"`
http_pkg.HttpServiceOptions
}
type ProxyTablePeerEntry ¶
type ProxyTablePeerEntry struct {
ID string `json:"id"`
Userinfo *ProxyPeerUserInfo `json:"userinfo"`
Enabled bool `json:"enabled"`
MaxConnections int `json:"max_connections"`
Bandwidth *ProxyPeerBandwidth `json:"bandwidth"`
DNS string `json:"dns"`
OutboundAddr string `json:"outbound_addr"`
}
type ServiceStatus ¶
type ServiceStatus struct {
BindAddr string `json:"bind_addr"`
Type string `json:"type"`
Up bool `json:"up"`
Peers []PeerStatus `json:"peers"`
Error string `json:"error,omitempty"`
}
type TrafficDelta ¶
Click to show internal directories.
Click to hide internal directories.