globals

package
v0.0.0-...-1a6bc1e Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PASSWORD_SALT_LENGTH int = 64
)

Variables

View Source
var BootTime time.Time

Time at which PFSD started. Used for calculating uptime.

View Source
var DiscoveryAddr string

DiscoveryAddr contains the connection sting to the discovery server

View Source
var Encrypted bool

Global key used by this instance of PFSD

View Source
var EncryptionKey *keyman.Key
View Source
var HeldKeyPieces = make(KeyPieceStore)
View Source
var KeyGenerated bool
View Source
var MountPoint string
View Source
var NetworkOff bool
View Source
var Nodes = nodes{/* contains filtered or unexported fields */}

Nodes instance which controls all the information about other pfsd instances

View Source
var ParanoidDir string
View Source
var PoolPasswordHash []byte

The hash of the password required to join the raft cluster

View Source
var PoolPasswordSalt []byte
View Source
var Quit = make(chan bool) // Doesn't matter what the channel holds
View Source
var RaftNetworkServer *raft.RaftNetworkServer
View Source
var ResetInterval time.Duration

ResetInterval containing how often the Renew function has to be called

View Source
var ShuttingDown bool
View Source
var TLSEnabled bool

If true, TLS is being used in all connections to and from PFSD

View Source
var TLSSkipVerify bool

If true, PFSD will not verify the TLS credentials of anything it connects to

View Source
var UPnPEnabled bool

If UPnP is enabled and a port mapping has been establised.

Global waitgroup for all goroutines in PFSD

Functions

func SetPoolPasswordHash

func SetPoolPasswordHash(password string) error

Types

type FileSystemAttributes

type FileSystemAttributes struct {
	Encrypted     bool       `json:"encrypted"`
	KeyGenerated  bool       `json:"keygenerated"`
	NetworkOff    bool       `json:"networkoff"`
	EncryptionKey keyman.Key `json:"encryptionkey,omitempty"` //The encryption key is only saved to file in this manner if networking is turned off
}

type KeyPieceMap

type KeyPieceMap map[string]*keyman.KeyPiece

type KeyPieceStore

type KeyPieceStore map[int64]KeyPieceMap

func (KeyPieceStore) AddPiece

func (ks KeyPieceStore) AddPiece(generation int64, nodeUUID string, piece *keyman.KeyPiece) error

func (KeyPieceStore) DeleteGeneration

func (ks KeyPieceStore) DeleteGeneration(generation int64) error

func (KeyPieceStore) DeletePiece

func (ks KeyPieceStore) DeletePiece(generation int64, nodeUUID string) error

func (KeyPieceStore) GetPiece

func (ks KeyPieceStore) GetPiece(generation int64, nodeUUID string) *keyman.KeyPiece

Returns nil if the piece is not found

func (KeyPieceStore) SaveToDisk

func (ks KeyPieceStore) SaveToDisk() error

type Node

type Node struct {
	IP         string
	Port       string
	CommonName string
	UUID       string
}

Node struct

var ThisNode Node

Node information for the current node

func (Node) String

func (n Node) String() string

Jump to

Keyboard shortcuts

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