mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add a DstStats
type to track Destination (real server) stats
Since SvcStats represents the stats for a `Service`, we don't want to reuse that struct in the `Destination` (for no other reason than incompatible nomenclature). So this patch adds a `DstStats` struct to hold the Destination stats.
This commit is contained in:
parent
e427c4ee2e
commit
0922883b7e
2 changed files with 5 additions and 2 deletions
|
@ -62,9 +62,12 @@ type Destination struct {
|
|||
LowerThreshold uint32
|
||||
ActiveConnections int
|
||||
InactiveConnections int
|
||||
Stats SvcStats
|
||||
Stats DstStats
|
||||
}
|
||||
|
||||
// DstStats defines IPVS destination (real server) statistics
|
||||
type DstStats SvcStats
|
||||
|
||||
// Handle provides a namespace specific ipvs handle to program ipvs
|
||||
// rules.
|
||||
type Handle struct {
|
||||
|
|
|
@ -448,7 +448,7 @@ func assembleDestination(attrs []syscall.NetlinkRouteAttr) (*Destination, error)
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
d.Stats = stats
|
||||
d.Stats = DstStats(stats)
|
||||
}
|
||||
}
|
||||
return &d, nil
|
||||
|
|
Loading…
Reference in a new issue