models

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Error string `json:"error"`
}

Error ...

type HostInfo

type HostInfo struct {
	Host   string `json:"host"`
	PubKey string `json:"pubKey" binding:"required"`
}

HostInfo comes from a node telling us it's alive

type MixHostInfo

type MixHostInfo struct {
	HostInfo
	Layer uint `json:"layer" binding:"required"`
}

MixHostInfo comes from a node telling us it's alive

type MixMetric

type MixMetric struct {
	PubKey   string          `json:"pubKey" binding:"required"`
	Sent     map[string]uint `json:"sent" binding:"required"`
	Received *uint           `json:"received" binding:"exists"`
}

MixMetric is a report from each mixnode detailing recent traffic. Useful for creating visualisations.

type MixNodePresence

type MixNodePresence struct {
	MixHostInfo
	LastSeen int64 `json:"lastSeen" binding:"required"`
}

MixNodePresence holds presence info for a mixnode

type MixProviderHostInfo

type MixProviderHostInfo struct {
	HostInfo
	RegisteredClients []RegisteredClient `json:"registeredClients" binding:"required"`
}

MixProviderHostInfo comes from a node telling us it's alive

type MixProviderPresence

type MixProviderPresence struct {
	MixProviderHostInfo
	LastSeen int64 `json:"lastSeen" binding:"required"`
}

MixProviderPresence holds presence info for a mix provider node

type Presence

type Presence struct {
	HostInfo
	LastSeen int64 `json:"lastSeen" binding:"required"`
}

Presence lets the server tell clients when a node was last seen

type RegisteredClient

type RegisteredClient struct {
	PubKey string `json:"pubKey" binding:"required"`
}

RegisteredClient holds information about client registered at a provider

type Topology

type Topology struct {
	CocoNodes        map[string]Presence
	MixNodes         map[string]MixNodePresence
	MixProviderNodes map[string]MixProviderPresence
}

Topology shows us the current state of the overall Nym network

Jump to

Keyboard shortcuts

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