Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NetworkTopology ¶ added in v2.0.30
type NetworkTopology interface { // LoadDestHostIDs loads destination host ids by source host id. LoadDestHostIDs(string) ([]string, error) // DeleteHost deletes host. DeleteHost(string) error // ProbedCount is the number of times the host has been probed. ProbedCount(string) (uint64, error) // LoadProbes loads probes by source host id and destination host id. LoadProbes(string, string) Probes }
NetworkTopology is an interface for network topology.
func NewNetworkTopology ¶ added in v2.0.30
func NewNetworkTopology(cfg config.NetworkTopologyConfig, rdb redis.UniversalClient, resource resource.Resource, storage storage.Storage) (NetworkTopology, error)
New network topology interface.
type Probe ¶
type Probe struct { // Host metadata. Host *resource.Host `json:"host"` // RTT is the round-trip time sent via this pinger. RTT time.Duration `json:"rtt"` // CreatedAt is the time to create probe. CreatedAt time.Time `json:"createdAt"` }
Probe is the probe metadata.
type Probes ¶
type Probes interface { // Peek returns the oldest probe without removing it. Peek() (*Probe, error) // Enqueue enqueues probe into the queue. Enqueue(*Probe) error // Dequeue removes and returns the oldest probe. Dequeue() (*Probe, error) // Length gets the length of probes. Length() (int64, error) // CreatedAt is the creation time of probes. CreatedAt() (time.Time, error) // UpdatedAt is the updated time to store probe. UpdatedAt() (time.Time, error) // AverageRTT is the average round-trip time of probes. AverageRTT() (time.Duration, error) }
Probes is the interface to store probes.
Click to show internal directories.
Click to hide internal directories.