Documentation ¶
Index ¶
- Variables
- func ConstructTree(n *Node, hc *HostConfig, parent string, suite abstract.Suite, ...) (int, error)
- func GetAddress() (string, error)
- func GetSuite(suite string) abstract.Suite
- type AppConfig
- type ConfigFile
- type ConfigFileOld
- type ConfigOptions
- type ConnType
- type HostConfig
- type HostsConfig
- type JSONPoint
- type Node
Constants ¶
This section is empty.
Variables ¶
var StartConfigPort = 9000
Functions ¶
func ConstructTree ¶
func ConstructTree( n *Node, hc *HostConfig, parent string, suite abstract.Suite, rand cipher.Stream, hosts map[string]coconet.Host, nameToAddr map[string]string, opts ConfigOptions) (int, error)
ConstructTree does a depth-first construction of the tree specified in the config file. ConstructTree must be called AFTER populating the HostConfig with ALL the possible hosts.
Types ¶
type AppConfig ¶
type AppConfig struct { Hostname string // Hostname like server-0.cs-dissent ? Logger string // ip addr of the logger to connect to PhysAddr string // physical IP addr of the host AmRoot bool // is the host root (i.e. special operations) TestConnect bool // Dylan-code to only test the connection and exit afterwards App string // which app are we running on this host ["coll_sign","coll_stamp","schnorr_sign"] Mode string // ["server", "client"] Name string // Comes from deter.go:187 - "Name of the node" Server string // Timestamping servers to contact }
type ConfigFile ¶
func ConfigFromTree ¶
func ConfigFromTree(t *graphs.Tree, hosts []string) *ConfigFile
type ConfigFileOld ¶
type ConfigOptions ¶
type ConfigOptions struct { ConnType string // "go", tcp" Hostnames []string // if not nil replace hostnames with these GenHosts bool // if true generate random hostnames (all tcp) Host string // hostname to load into memory: "" for all Port string // if specified rewrites all ports to be this Faulty bool // if true, use FaultyHost wrapper around Hosts Suite abstract.Suite // suite to use for Hosts NoTree bool // bool flag to tell wether we want to construct }
type HostConfig ¶
type HostConfig struct { SNodes []*sign.Node // an array of signing nodes Hosts map[string]*sign.Node // maps hostname to host Dir *coconet.GoDirectory // the directory mapping hostnames to goPeers }
HostConfig stores all of the relevant information of the configuration file.
func LoadConfig ¶
func LoadConfig(fname string, opts ...ConfigOptions) (*HostConfig, error)
TODO: if in tcp mode associate each hostname in the file with a different port. Get the remote address of this computer to combine with those for the complete hostnames to be used by the hosts. LoadConfig loads a configuration file in the format specified above. It populates a HostConfig with HostNode Hosts and goPeer Peers.
func LoadJSON ¶
func LoadJSON(file []byte, optsSlice ...ConfigOptions) (*HostConfig, error)
func NewHostConfig ¶
func NewHostConfig() *HostConfig
NewHostConfig creates a new host configuration that can be populated with hosts.
func (*HostConfig) String ¶
func (hc *HostConfig) String() string
func (*HostConfig) Verify ¶
func (hc *HostConfig) Verify() error
type HostsConfig ¶
Simplest config representig the type of connection we want to do (tcp / goroutines ?) and the list of hostnames like "10.0.4.10:2000
type JSONPoint ¶
type JSONPoint json.RawMessage