model

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 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 ConfigNetDomain

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

type ConfigNodeGroup

type ConfigNodeGroup struct {
	Name               string            `json:"name"`
	GType              GType             `json:"type,omitempty"` // 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 {
	GroupID        boson.Address  `json:"gid"`
	Connected      int            `json:"connected"`
	ConnectedPeers []*md.PeerInfo `json:"connectedPeers"`
}

type GType

type GType int
const (
	GTypeJoin GType = iota
	GTypeObserve
)

type GroupInfo

type GroupInfo struct {
	GroupID   boson.Address   `json:"gid"`
	Option    ConfigNodeGroup `json:"option"`
	KeepPeers []boson.Address `json:"keepPeers"`
	KnowPeers []boson.Address `json:"knowPeers"`
}

type KadParams

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

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"`
}

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