dns

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 7 Imported by: 0

README

Overview

DNS is a address dispatch service of the ELA peer-to-peer network.

Build

$ make dns

Run DNS service

There are 3 optional parameters for the DNS service

  1. Net, use -net <network> to specify the network parameters for the DNS service, it can be mainnet testnet or regnet, the DNS service use mainnet parameters by default.
  2. Magic, use -magic to specify the magic number of the DNS service, it will overwrite the magic number in network parameters even the network has been specified by using -net parameter.
  3. Port, use -port to specify a port for the DNS service, it will overwrite the port number in network parameters even the network has been specified by using -net parameter.
  4. Debug, use -debug to enable debug mode, in debug mode, DNS service will print out debug logs.

Run DNS service with default mainnet network parameters.

$ ./ela-dns

Specify the network.

$ ./ela-dns -net testnet

Specify the magic number.

$ ./ela-dns -magic 123123

Specify the serving port.

$ ./ela-dns -port 12345

Enable debug mode.

$ ./ela-dns -debug

Use all of them.

$ ./ela-dns -net regnet -magic 123123 -port 12345  -debug

Documentation

Overview

DNS is a peer-to-peer network address distribute service. It is a special peer-to-peer server that only accept connections and send known addresses of other peers to the connected peer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.

func UseLogger

func UseLogger(logger elalog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using elalog.

Types

type DNS

type DNS struct {
	server.IServer
}

DNS is the peer-to-peer network address distribute service implement.

func New

func New(dataDir string, magic uint32, port uint16, newVersionHeight uint64, nodeVersion string) (*DNS, error)

New creates and return a DNS instance.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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