chore: Add missing for summary interfaces (#3438)

Add missing `Errors` Getter & Setter for Session & Connection Summary interfaces
This commit is contained in:
Elim Tsiagbey authored and GitHub committed 2023-07-13 15:48:27 -04:00
1 parent d776f6702e
commit ed7bc7cc4d
1 file changed
+28
+28
View File
@@ -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
}