Documentation
¶
Index ¶
- Constants
- func DiscoveryService(s ...ServiceDiscovery) func(cfg *Config) error
- func ExchangeKeys(s string) func(cfg *Config) error
- func FromBase64(bb 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(ss ...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 NetLinkBootstrap(b bool) func(cfg *Config) error
- 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 WithLibp2pAdditionalOptions(i ...libp2p.Option) func(cfg *Config) error
- func WithLibp2pOptions(i ...libp2p.Option) func(cfg *Config) error
- func WithMaxBlockChainSize(i int) func(cfg *Config) error
- func WithPacketMTU(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 ¶
View Source
const Protocol = "/edgevpn/0.1"
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 FromBase64 ¶ added in v0.0.6
func ListenAddresses ¶
func MaxMessageSize ¶
func NetLinkBootstrap ¶ added in v0.0.3
func SealKeyInterval ¶
func SealKeyLength ¶
func WithInterfaceAddress ¶
func WithInterfaceMTU ¶
func WithInterfaceName ¶
func WithInterfaceType ¶
func WithInterfaceType(d water.DeviceType) func(cfg *Config) error
func WithLibp2pAdditionalOptions ¶ added in v0.0.4
func WithLibp2pOptions ¶ added in v0.0.3
WithLibp2pOptions Overrides defaults options
func WithMaxBlockChainSize ¶ added in v0.0.5
func WithPacketMTU ¶ added in v0.0.5
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 SealKeyInterval int Interface *water.Interface InterfaceName string InterfaceAddress string InterfaceMTU int MTU int DeviceType water.DeviceType ServiceDiscovery []ServiceDiscovery Logger *zap.Logger SealKeyLength int MaxBlockChainLength int NetLinkBootstrap bool // Handle is a handle consumed by HumanInterfaces to handle received messages Handle func(bool, *hub.Message) AdditionalOptions, Options []libp2p.Option }
type EdgeVPN ¶
func (*EdgeVPN) MessageWriter ¶
func (e *EdgeVPN) MessageWriter(opts ...hub.MessageOption) (*MessageWriter, error)
MessageWriter returns a new MessageWriter bound to the edgevpn instance with the given options
type MessageWriter ¶
type MessageWriter struct {
// contains filtered or unexported fields
}
func (*MessageWriter) WriteString ¶ added in v0.0.5
func (mw *MessageWriter) WriteString(p string) (n int, err error)
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)
Click to show internal directories.
Click to hide internal directories.