dns

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNS

type DNS struct {
	// contains filtered or unexported fields
}

func NewDNS

func NewDNS(
	ctx context.Context,
	wg *sync.WaitGroup,
	cmd *cobra.Command,
	address string,
	port int,
	nodeAddress multiaddr.Multiaddr,
	nodePort int,
	nodeId string,
	mode DNSMode,
) (*DNS, error)

func (*DNS) ShutDown

func (dns *DNS) ShutDown()

Shuts down the DNS server

func (*DNS) Start

func (dns *DNS) Start()

Starts the DNS server

type DNSMode

type DNSMode int
const (
	PROTOBUF DNSMode = iota
	JSON
)

type PeerInfo added in v0.0.4

type PeerInfo struct {
	Address string `json:"address"`
	Port    int    `json:"port"`
	Id      string `json:"id"`
	Mode    string `json:"mode"`
}

Response structures

Jump to

Keyboard shortcuts

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