peer

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const ConnectionInfoType = "nimona.io/peer.ConnectionInfo"
View Source
const (
	ErrInvalidShorthand = errors.Error("invalid shorthand")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionInfo added in v0.14.1

type ConnectionInfo struct {
	Metadata      object.Metadata   `nimona:"@metadata:m,type=nimona.io/peer.ConnectionInfo"`
	Version       int64             `nimona:"version:i"`
	PublicKey     crypto.PublicKey  `nimona:"publicKey:s"`
	Addresses     []string          `nimona:"addresses:as"`
	Relays        []*ConnectionInfo `nimona:"relays:am"`
	ObjectFormats []string          `nimona:"objectFormats:as"`
}

type Shorthand added in v0.11.0

type Shorthand string

Shorthand has the form of `<public-key>@<address>`. They are mostly used for configuration and bootstrapping.

func (Shorthand) GetConnectionInfo added in v0.19.0

func (s Shorthand) GetConnectionInfo() (*ConnectionInfo, error)

func (Shorthand) IsValid added in v0.11.0

func (s Shorthand) IsValid() bool

Jump to

Keyboard shortcuts

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