Documentation ¶
Index ¶
- Constants
- func DefaultMTU() (int, error)
- func EnableCreateEdgeConnection(localEndpoint *types.Endpoint, remoteEndpoint *types.Endpoint) bool
- func FindCentralGwFn(network *types.Network) *types.Endpoint
- func GetPSK() string
- func RegisterDriver(name string, factory Factory)
- type Connection
- type Driver
- type Factory
Constants ¶
View Source
const ( DefaultPSK = "openyurt-raven" DefaultVPNPort = "4500" )
Variables ¶
This section is empty.
Functions ¶
func DefaultMTU ¶ added in v0.2.0
func EnableCreateEdgeConnection ¶ added in v0.4.1
EnableCreateEdgeConnection determine whether VPN tunnels can be established between edges.
func FindCentralGwFn ¶ added in v0.2.0
FindCentralGwFn tries to find a central gateway from the given network. Returns nil if no central gateway found. A central gateway is used to forward traffic between gateway under nat network, in which the gateways can not establish ipsec connection directly.
func RegisterDriver ¶
Types ¶
type Connection ¶ added in v0.2.0
type Connection struct { LocalEndpoint *types.Endpoint RemoteEndpoint *types.Endpoint LocalSubnet string RemoteSubnet string }
Connection is the struct for VPN connection.
type Driver ¶
type Driver interface { // Init inits the driver. If return an error, raven agent will exit. Init() error // Apply applies the given network to the cluster, which represents the desired state of the cluster. // If return an error, the caller is expected to retry again later. // Usually, the implementation should compare the current network state with the given desired state, // and make changes to reach the desired state. // This method should be idempotent. Apply(network *types.Network, routeDriverMTU func(*types.Network) (int, error)) error // MTU return Minimal MTU in vpn driver MTU() (int, error) // Cleanup performs the necessary uninstallation. Cleanup() error }
Driver is the interface for VPN implementation.
Click to show internal directories.
Click to hide internal directories.