types

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handshake

type Handshake struct {
	Enable bool   `json:"enable"`
	Peers  uint64 `json:"peers"`
}

type Info

type Info struct {
	Address                string                `json:"address"`
	Bandwidth              clienttypes.Bandwidth `json:"bandwidth"`
	Handshake              Handshake             `json:"handshake"`
	IntervalSetSessions    time.Duration         `json:"interval_set_sessions"`
	IntervalUpdateSessions time.Duration         `json:"interval_update_sessions"`
	IntervalUpdateStatus   time.Duration         `json:"interval_update_status"`
	Latency                time.Duration         `json:"latency"`
	Location               Location              `json:"location"`
	Moniker                string                `json:"moniker"`
	Operator               string                `json:"operator"`
	Peers                  int                   `json:"peers"`
	Price                  string                `json:"price"`
	Provider               string                `json:"provider"`
	Type                   uint64                `json:"type"`
	Version                string                `json:"version"`
}

type Location

type Location struct {
	City      string  `json:"city"`
	Country   string  `json:"country"`
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

type Node

type Node struct {
	Info
	Address   string            `json:"address"`
	Provider  string            `json:"provider"`
	Price     clienttypes.Coins `json:"price"`
	RemoteURL string            `json:"remote_url"`
	Status    string            `json:"status"`
	StatusAt  time.Time         `json:"status_at"`
}

func NewNodeFromRaw

func NewNodeFromRaw(v *nodetypes.Node) Node

func (Node) WithInfo

func (n Node) WithInfo(v Info) Node

type Nodes

type Nodes []Node

func NewNodesFromRaw

func NewNodesFromRaw(v nodetypes.Nodes) Nodes

Jump to

Keyboard shortcuts

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