configuration

package
v0.0.0-...-6f32bdd Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfBootNodeList

func ConfBootNodeList(instance *state.State, transactionData *bind.TransactOpts, conf *Configuration)

* Description: Sets up a boot node list by using the Ethereum blockchain smart contract and * adds them to the address list of peers in the Configuration struct. * @dev return nothing. * @return value of 'nothing'

Types

type AddressList

type AddressList []peer.AddrInfo

Used to create a new type of slice

func (*AddressList) Set

func (al *AddressList) Set(value string) error

* Description: Sets a new multi-address to the addresslist of peers. * @dev return error on failure nil on success. * @return value of 'error'

func (*AddressList) String

func (al *AddressList) String() string

* Description: This iterates over an address list of peers * and concatantes it into a string. * @dev Return a concatnated string * @return value of 'string'

type Configuration

type Configuration struct {
	Port           int
	Seed           int64
	DiscoveryPeers AddressList
	UserName       string
	Password       string
	Node           string
	Room           string
}

Used to create a struct which contains values used by the program

func Config

func Config(seed int64, name string) *Configuration

* Description: Sets up a strcut with either pre configured values or read in values from the user. * @dev return a pointer to a Configuration struct. * @return value of 'Pointer to configuration struct'

Jump to

Keyboard shortcuts

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