Documentation
¶
Index ¶
- Constants
- type Bridge
- type Config
- type Log
- type Metrics
- type Reconcile
- type ReconcileBridgeActivate
- type ReconcileBridgeActivateAWS
- type ReconcileBridgeActivateAWSVpc
- type ReconcileBridgeActivateGCP
- type ReconcileBridgeActivateGCPVpc
- type ReconcileInterfaceActivate
- type ReconcileInterfaceDeactivate
- type ReconcileReapply
- type Scripts
- type Server
- type TunnelInterface
Constants ¶
View Source
const ( DefaultConfigFile = ".vpnham.yaml" DefaultLogLevel = "info" DefaultLogMode = "prod" DefaultPartnerStatusTimeout = time.Second DefaultProbeInterval = 15 * time.Second DefaultThresholdDown = 5 DefaultThresholdUp = 2 DefaultAWSTimeout = 15 * time.Second DefaultGCPTimeout = 15 * time.Second DefaultScriptsTimeout = 30 * time.Second DefaultRouteIDPrefix = "vpnham" DefaultGCPRoutePriority uint32 = 1000 DefaultMetricsListenAddr = "0.0.0.0:8000" DefaultLatencyBucketsCount = 33 // from 1us to 1s DefaultMaxLatencyUs = 1000000 // 1s DefaultReapplyFactor = 2.0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bridge ¶
type Bridge struct {
Name string `yaml:"-"`
UUID uuid.UUID `yaml:"-"`
Role types.Role `yaml:"role"`
BridgeInterface string `yaml:"bridge_interface"`
PeerCIDR types.CIDR `yaml:"peer_cidr"`
ExtraPeerCIDRs []types.CIDR `yaml:"extra_peer_cidrs"`
SecondaryInterfaces []string `yaml:"secondary_interfaces"`
StatusAddr types.Address `yaml:"status_addr"`
PartnerURL string `yaml:"partner_url"`
PartnerPollingInterface string `yaml:"partner_polling_interface"`
PartnerStatusTimeout time.Duration `yaml:"partner_status_timeout"`
PartnerStatusThresholdDown int `yaml:"partner_status_threshold_down"`
PartnerStatusThresholdUp int `yaml:"partner_status_threshold_up"`
ProbeInterval time.Duration `yaml:"probe_interval"`
ProbeLocation types.Location `yaml:"probe_location"`
TunnelInterfaces map[string]*TunnelInterface `yaml:"tunnel_interfaces"`
Reconcile *Reconcile `yaml:"reconcile"`
}
func (*Bridge) BridgePeerCIDRs ¶ added in v0.0.14
func (*Bridge) TunnelInterfacesCount ¶
type Metrics ¶
type Reconcile ¶ added in v0.0.5
type Reconcile struct {
BridgeName string `yaml:"-"`
BridgeInterface string `yaml:"-"`
SecondaryInterfaces []string `yaml:"-"`
ScriptsTimeout time.Duration `yaml:"scripts_timeout"`
BridgeActivate *ReconcileBridgeActivate `yaml:"bridge_activate"`
InterfaceActivate *ReconcileInterfaceActivate `yaml:"interface_activate"`
InterfaceDeactivate *ReconcileInterfaceDeactivate `yaml:"interface_deactivate"`
}
type ReconcileBridgeActivate ¶ added in v0.0.5
type ReconcileBridgeActivate struct {
BridgeName string `yaml:"-"`
BridgeInterface string `yaml:"-"`
SecondaryInterfaces []string `yaml:"-"`
Reapply *ReconcileReapply `yaml:"reapply"`
AWS *ReconcileBridgeActivateAWS `yaml:"aws"`
GCP *ReconcileBridgeActivateGCP `yaml:"gcp"`
Script types.Script `yaml:"script"`
}
type ReconcileBridgeActivateAWS ¶ added in v0.0.5
type ReconcileBridgeActivateAWSVpc ¶ added in v0.0.9
type ReconcileBridgeActivateGCP ¶ added in v0.0.10
type ReconcileBridgeActivateGCP struct {
BridgeName string `yaml:"-"`
BridgeInterface string `yaml:"-"`
InstanceName string `yaml:"-"`
ProjectID string `yaml:"-"`
SecondaryInterfaces []string `yaml:"-"`
Vpcs map[string]*ReconcileBridgeActivateGCPVpc `yaml:"-"`
RouteIDPrefix string `yaml:"route_id_prefix"`
RoutePriority uint32 `yaml:"route_priority"`
RouteTags []string `yaml:"route_tags"`
Timeout time.Duration `yaml:"timeout"`
}
type ReconcileBridgeActivateGCPVpc ¶ added in v0.0.10
type ReconcileInterfaceActivate ¶ added in v0.0.5
type ReconcileInterfaceActivate struct {
Reapply *ReconcileReapply `yaml:"reapply"`
Script types.Script `yaml:"script"`
}
type ReconcileInterfaceDeactivate ¶ added in v0.0.5
type ReconcileReapply ¶ added in v0.0.5
type ReconcileReapply struct {
InitialDelay time.Duration `yaml:"initial_delay"`
MaximumDelay time.Duration `yaml:"maximum_delay"`
Factor float64 `yaml:"factor"`
// contains filtered or unexported fields
}
func (*ReconcileReapply) DelayOnIteration ¶ added in v0.0.5
func (rr *ReconcileReapply) DelayOnIteration(iteration int) time.Duration
func (*ReconcileReapply) Enabled ¶ added in v0.0.5
func (rr *ReconcileReapply) Enabled() bool
type Server ¶
type Server struct {
Bridges map[string]*Bridge `yaml:"bridges"`
Metrics *Metrics `yaml:"metrics"`
}
func (*Server) BridgesCount ¶
func (*Server) EventSourcesCount ¶
func (*Server) TunnelInterfacesCount ¶
type TunnelInterface ¶
type TunnelInterface struct {
Name string
Role types.Role `yaml:"role"`
Addr types.Address `yaml:"addr"`
ProbeAddr types.Address `yaml:"probe_addr"`
ThresholdDown int `yaml:"threshold_down"`
ThresholdUp int `yaml:"threshold_up"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.