Documentation ¶
Index ¶
- func DiscoveryService(s ...ServiceDiscovery) func(cfg *Config) error
- func ExchangeKeys(s string) func(cfg *Config) error
- func FromYaml(path string) func(cfg *Config) error
- func Handlers(h ...Handler) func(cfg *Config) error
- func Insecure(b bool) func(cfg *Config) error
- func ListenAddresses(s string) func(cfg *Config) error
- func LogLevel(l log.LogLevel) func(cfg *Config) error
- func Logger(l *zap.Logger) func(cfg *Config) error
- func MaxMessageSize(i int) func(cfg *Config) error
- func Message(template string, opts ...interface{}) []byte
- func RoomName(s string) func(cfg *Config) error
- func SealKeyInterval(i int) func(cfg *Config) error
- func SealKeyLength(i int) func(cfg *Config) error
- func WithInterface(i *water.Interface) func(cfg *Config) error
- func WithInterfaceAddress(i string) func(cfg *Config) error
- func WithInterfaceMTU(i int) func(cfg *Config) error
- func WithInterfaceName(i string) func(cfg *Config) error
- func WithInterfaceType(d water.DeviceType) func(cfg *Config) error
- func WithMTU(i int) func(cfg *Config) error
- type Config
- type EdgeVPN
- type Handler
- type MessageWriter
- type OTP
- type OTPConfig
- type Option
- type ServiceDiscovery
- type YAMLConnectionConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscoveryService ¶
func DiscoveryService(s ...ServiceDiscovery) func(cfg *Config) error
DiscoveryService Adds the service given as argument to the discovery services
func ExchangeKeys ¶
func ListenAddresses ¶
func MaxMessageSize ¶
func SealKeyInterval ¶
func SealKeyLength ¶
func WithInterfaceAddress ¶
func WithInterfaceMTU ¶
func WithInterfaceName ¶
func WithInterfaceType ¶
func WithInterfaceType(d water.DeviceType) func(cfg *Config) error
Types ¶
type Config ¶
type Config struct { // ExchangeKey is a Symmetric key used to seal the messages ExchangeKey string // RoomName is the gossip room where all peers are subscribed to RoomName string // ListenAddresses is the discovery peer initial bootstrap addresses ListenAddresses discovery.AddrList // Insecure disables secure p2p e2e encrypted communication Insecure bool // Handlers are a list of handlers subscribed to messages received by the vpn interface Handlers []Handler MaxMessageSize int MTU int SealKeyInterval int Interface *water.Interface InterfaceName string InterfaceAddress string InterfaceMTU int DeviceType water.DeviceType ServiceDiscovery []ServiceDiscovery Logger *zap.Logger SealKeyLength int // Handle is a handle consumed by HumanInterfaces to handle received messages Handle func(bool, *hub.Message) }
type EdgeVPN ¶
func (*EdgeVPN) MessageWriter ¶
func (e *EdgeVPN) MessageWriter(opts ...hub.MessageOption) (*MessageWriter, error)
type Handler ¶
func IfaceWriter ¶
type MessageWriter ¶
type MessageWriter struct {
// contains filtered or unexported fields
}
type ServiceDiscovery ¶
type YAMLConnectionConfig ¶
type YAMLConnectionConfig struct { OTP OTP `yaml:"otp"` RoomName string `yaml:"room"` Rendezvous string `yaml:"rendezvous"` MDNS string `yaml:"mdns"` }
func GenerateNewConnectionData ¶
func GenerateNewConnectionData() (*YAMLConnectionConfig, error)
func (YAMLConnectionConfig) Fill ¶
func (y YAMLConnectionConfig) Fill(cfg *Config)
Click to show internal directories.
Click to hide internal directories.