Documentation ¶
Overview ¶
Code compliments of http://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file-in-golang
Filename manipulation routines initially written on 5/6/17
Hash.go, based the the goarchit/sample/hashfile.go routine Black2B is significantly faster than other hashes for our need Routine is called per 1GB slice and to create an authentication hash for each 32mb encoded slice
Index ¶
- Constants
- Variables
- func BuildMatrix()
- func Challenge()
- func CopyFile(src, dst string) (err error)
- func Dnsseed()
- func Encode(tblock *[(32 + MaxRaptor) * ShardLen]byte, block *[32 * ShardLen]byte, i int)
- func Encrypt(tblock []byte, iv *[32 + MaxRaptor][aes.BlockSize]byte, i int)
- func FullPath(path string) string
- func GetExtIP() string
- func GetOutboundIP() string
- func HashString(source string) ([]byte, error)
- func IsMulticastCapable(network string, ifi *net.Interface) (net.IP, bool)
- func RSACheck(private, public string) error
- func RSAGenerate(private, public string)
- func RoutedInterface(network string, flags net.Flags) *net.Interface
- func XorBytes(dst, b []byte) int
- type ByRep
- type Peer
- type PeerList
- type SortedPeer
Constants ¶
const FileDBName = "FileInfo.bolt"
const GB uint64 = 1024 * 1024 * 1024
const MaxRaptor = 12
const OutOfHops = "Out of Hops"
const PeerDBName = "PeerInfo.bolt"
const SeedPortBase = ":1958"
const ShardLen = 32 * 1024 * 1024
Variables ¶
var Account string
Subcommand flags that may be found in the configuration file
var Chaos bool
var Conf string
Global command line flags found in ../config/parser.go and likely in the configuration file
var DBDir string
var DNSSeeds []string
var DataDir string
var DerivedKey []byte
var FarmerStop chan bool
var IAmASeed bool
var KeyPIN int
var KeyPass string
var LogFile string
var LogLevel int
var Matrix [32 + MaxRaptor][32]int
var MatrixCount [32 + MaxRaptor]int
var MinFreeSpace uint64
var Mutex sync.Mutex
var MyDNSServerIP string
var PortBase int
var PublicIP string
var Raptor int
var ResetLog bool
var SeedMode bool
var SliceName string
var Verbose int
var WG sync.WaitGroup
var WalletAddr string
var WalletIP string
var WalletPassword string
var WalletPort int
var WalletUser string
Functions ¶
func BuildMatrix ¶
func BuildMatrix()
func CopyFile ¶
CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherise, attempt to create a hard link between the two files. If that fail, copy the file contents from src to dst.
func HashString ¶
func IsMulticastCapable ¶
IsMulticastCapable reports whether ifi is an IP multicast-capable network interface. Network must be "ip", "ip4" or "ip6".
func RSAGenerate ¶
func RSAGenerate(private, public string)
func RoutedInterface ¶
RoutedInterface returns a network interface that can route IP traffic and satisfies flags. It returns nil when an appropriate network interface is not found. Network must be "ip", "ip4" or "ip6".
Types ¶
type ByRep ¶
type ByRep []SortedPeer