Documentation
¶
Index ¶
- func DHCPNetworkService(ip chan string, l log.StandardLogger, maxTime time.Duration, leasedir string, ...) node.NetworkService
- func Logger(l log.StandardLogger) func(cfg *Config) error
- func NetLinkBootstrap(b bool) func(cfg *Config) error
- func Register(p ...Option) ([]node.Option, error)
- func VPNNetworkService(p ...Option) node.NetworkService
- 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 WithLedgerAnnounceTime(t time.Duration) func(cfg *Config) error
- func WithPacketMTU(i int) func(cfg *Config) error
- func WithRouterAddress(i string) func(cfg *Config) error
- type Config
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DHCPNetworkService ¶ added in v0.8.6
func DHCPNetworkService(ip chan string, l log.StandardLogger, maxTime time.Duration, leasedir string, address string) node.NetworkService
DHCPNetworkService returns a DHCP network service
func NetLinkBootstrap ¶
func Register ¶ added in v0.7.2
Start the node and the vpn. Returns an error in case of failure When starting the vpn, there is no need to start the node
func VPNNetworkService ¶ added in v0.8.6
func VPNNetworkService(p ...Option) node.NetworkService
func WithInterfaceAddress ¶
func WithInterfaceMTU ¶
func WithInterfaceName ¶
func WithInterfaceType ¶
func WithInterfaceType(d water.DeviceType) func(cfg *Config) error
func WithPacketMTU ¶
func WithRouterAddress ¶
Types ¶
type Config ¶
type Config struct {
Interface *water.Interface
InterfaceName string
InterfaceAddress string
RouterAddress string
InterfaceMTU int
MTU int
DeviceType water.DeviceType
LedgerAnnounceTime time.Duration
Logger log.StandardLogger
NetLinkBootstrap bool
// Frame timeout
Timeout time.Duration
Concurrency int
ChannelBufferSize int
// contains filtered or unexported fields
}
type Option ¶
func DHCP ¶ added in v0.8.1
func DHCP(l log.StandardLogger, maxTime time.Duration, leasedir string, address string) ([]node.Option, []Option)
DHCP returns a DHCP network service. It requires the Alive Service in order to determine available nodes. Nodes available are used to determine which needs an IP and when maxTime expires nodes are marked as offline and not considered.
func WithChannelBufferSize ¶
func WithConcurrency ¶
func WithTimeout ¶
Click to show internal directories.
Click to hide internal directories.