/*
NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2018 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2019 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
"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"
FreqMinSize int64
Via []*NodeId
Addrs map[string]string
+ RxRate int
+ TxRate int
OnlineDeadline uint
MaxOnlineTime uint
Calls []*Call
NoisePrv *[32]byte
}
-type Call struct {
- Cron *cronexpr.Expression
- Nice uint8
- Xx TRxTx
- Addr *string
- OnlineDeadline uint
- MaxOnlineTime uint
-}
-
func NewNodeGenerate() (*NodeOur, error) {
exchPub, exchPrv, err := box.GenerateKey(rand.Reader)
if err != nil {