import (
"crypto/rand"
"errors"
+ "sync"
"github.com/flynn/noise"
+ "github.com/gorhill/cronexpr"
"golang.org/x/crypto/blake2b"
"golang.org/x/crypto/ed25519"
"golang.org/x/crypto/nacl/box"
Via []*NodeId
Addrs map[string]string
OnlineDeadline int
+ Calls []*Call
+
+ Busy bool
+ sync.Mutex
}
type NodeOur struct {
NoisePrv *[32]byte
}
+type Call struct {
+ Cron *cronexpr.Expression
+ Nice uint8
+ Xx *TRxTx
+ Addr *string
+ OnlineDeadline int
+}
+
func NewNodeGenerate() (*NodeOur, error) {
exchPub, exchPrv, err := box.GenerateKey(rand.Reader)
if err != nil {