network

package
v0.0.0-...-3444db6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Network

type Network struct {
	TimeStamp        time.Time
	ID               string
	AnnounceInterval int     // seconds
	HelloInterval    int     // seconds (0=disabled)
	MaxClientAge     float64 // days
	Hash             string
}

func (*Network) CheckConfig

func (sn *Network) CheckConfig() bool

func (*Network) CheckHashWithLocalKey

func (sn *Network) CheckHashWithLocalKey(hash string) bool

func (*Network) CheckID

func (sn *Network) CheckID(id string) bool

func (*Network) CheckKey

func (sn *Network) CheckKey(key []byte) bool

func (Network) Get

func (sn Network) Get() Network

func (*Network) GetAnnounceInterval

func (sn *Network) GetAnnounceInterval() time.Duration

func (*Network) GetAnnounceIntervalInt

func (sn *Network) GetAnnounceIntervalInt() int

func (*Network) GetHelloInterval

func (sn *Network) GetHelloInterval() time.Duration

func (*Network) GetHelloIntervalInt

func (sn *Network) GetHelloIntervalInt() int

func (*Network) GetID

func (sn *Network) GetID() string

func (*Network) GetMaxClientAge

func (sn *Network) GetMaxClientAge() float64

func (*Network) SetAnnounceInterval

func (sn *Network) SetAnnounceInterval(sec int)

func (*Network) SetHelloInterval

func (sn *Network) SetHelloInterval(sec int)

func (*Network) SetKey

func (sn *Network) SetKey(key []byte)

func (*Network) SetMaxClientAge

func (sn *Network) SetMaxClientAge(maxage float64)

func (*Network) SetTimeStamp

func (sn *Network) SetTimeStamp(t time.Time)

func (*Network) Update

func (sn *Network) Update(net Network)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL