chore: Add missing for summary interfaces (#3438)

Add missing `Errors` Getter & Setter for Session & Connection Summary interfaces
pull/3451/head
Elim Tsiagbey 3 years ago committed by GitHub
parent d776f6702e
commit ed7bc7cc4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -56,6 +56,10 @@ type SessionSummary interface {
Summary
// GetConnectionCount returns the connection count.
GetConnectionCount() uint64
// GetErrors returns errors.
GetErrors() error
// SetErrors sets errors.
SetErrors(e error)
}
func AllocSessionSummary(_ context.Context) Summary {
@ -82,6 +86,16 @@ func (b *BaseSessionSummary) GetConnectionCount() uint64 {
return b.ConnectionCount
}
// GetErrors returns errors.
func (b *BaseSessionSummary) GetErrors() error {
return b.Errors
}
// SetErrors sets errors.
func (b *BaseSessionSummary) SetErrors(e error) {
b.Errors = e
}
// BaseChannelSummary encapsulates data for a channel, including its id, channel type,
// start/end time using a monotonic clock, and the bytes up/ down seen on this channel
type BaseChannelSummary struct {
@ -167,6 +181,10 @@ type ConnectionSummary interface {
GetBytesUp() uint64
// BytesDown returns download bytes.
GetBytesDown() uint64
// GetErrors returns errors.
GetErrors() error
// SetErrors sets errors.
SetErrors(e error)
}
func AllocConnectionSummary(_ context.Context) Summary {
@ -202,3 +220,13 @@ func (b *BaseConnectionSummary) GetBytesUp() uint64 {
func (b *BaseConnectionSummary) GetBytesDown() uint64 {
return b.BytesDown
}
// GetErrors returns errors.
func (b *BaseConnectionSummary) GetErrors() error {
return b.Errors
}
// SetErrors sets errors.
func (b *BaseConnectionSummary) SetErrors(e error) {
b.Errors = e
}

Loading…
Cancel
Save