1
0
Fork 0
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:
Akshay 2018-10-10 13:42:59 -07:00
parent e427c4ee2e
commit 0922883b7e
2 changed files with 5 additions and 2 deletions

View file

@ -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 {

View file

@ -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