type LeaderStats … type leaderStats … // NewLeaderStats generates a new LeaderStats with the given id as leader func NewLeaderStats(lg *zap.Logger, id string) *LeaderStats { … } func (ls *LeaderStats) JSON() []byte { … } func (ls *LeaderStats) Follower(name string) *FollowerStats { … } type FollowerStats … type LatencyStats … type CountsStats … // Succ updates the FollowerStats with a successful send func (fs *FollowerStats) Succ(d time.Duration) { … } // Fail updates the FollowerStats with an unsuccessful send func (fs *FollowerStats) Fail() { … }