model

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2022 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigNetDomain added in v1.3.0

type ConfigNetDomain struct {
	Domain string `json:"domain"`
	Addr   string `json:"addr"`
}

type ConfigNodeGroup added in v1.3.0

type ConfigNodeGroup struct {
	Name               string            `json:"name"`
	GType              GType             `json:"type"` // 0 join 1 observe
	KeepConnectedPeers int               `json:"keep-connected-peers"`
	KeepPingPeers      int               `json:"keep-ping-peers"`
	Nodes              []boson.Address   `json:"nodes,omitempty"`
	AgentHttp          []ConfigNetDomain `json:"agent-http,omitempty"`
	AgentWS            []ConfigNetDomain `json:"agent-ws,omitempty"`
}

type ConnectedInfo

type ConnectedInfo struct {
	Connected      int            `json:"connected"`
	ConnectedPeers []*md.PeerInfo `json:"connectedPeers"`
}

type GType added in v1.3.0

type GType int
const (
	GTypeJoin GType = iota
	GTypeObserve
	GTypeKnown
)

type GroupInfo

type GroupInfo struct {
	GroupID       boson.Address   `json:"gid"`
	Option        ConfigNodeGroup `json:"option"`
	KeepPeers     []boson.Address `json:"keepPeers"`
	KnowPeers     []boson.Address `json:"knowPeers"`
	ConnectedInfo *ConnectedInfo  `json:"connectedInfo"` // connected info
}

type KadParams

type KadParams struct {
	Connected int          `json:"connected"` // connected count
	Timestamp time.Time    `json:"timestamp"` // now
	Groups    []*GroupInfo `json:"groups"`    // known
}

type MetricSnapshotView

type MetricSnapshotView struct {
	LastSeenTimestamp          int64   `json:"lastSeenTimestamp"`
	SessionConnectionRetry     uint64  `json:"sessionConnectionRetry"`
	ConnectionTotalDuration    float64 `json:"connectionTotalDuration"`
	SessionConnectionDuration  float64 `json:"sessionConnectionDuration"`
	SessionConnectionDirection string  `json:"sessionConnectionDirection"`
	LatencyEWMA                int64   `json:"latencyEWMA"`
	Reachability               string  `json:"reachability"`
}

MetricSnapshotView represents snapshot of metrics counters in more human readable form.

Jump to

Keyboard shortcuts

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