Documentation ¶
Overview ¶
Package codecounter provides a goroutine unsafe HTTP status code counter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPStatusCodeCounter ¶
type HTTPStatusCodeCounter struct {
// contains filtered or unexported fields
}
HTTPStatusCodeCounter is the goroutine unsafe HTTP status code counter. It is designed for counting http status code which is 1XX - 5XX, So the code range are limited to [0, 999]
func (*HTTPStatusCodeCounter) Codes ¶
func (cc *HTTPStatusCodeCounter) Codes() map[int]uint64
Codes returns the codes.
func (*HTTPStatusCodeCounter) Count ¶
func (cc *HTTPStatusCodeCounter) Count(code int)
Count counts a new code.
func (*HTTPStatusCodeCounter) Reset ¶
func (cc *HTTPStatusCodeCounter) Reset()
Reset resets counters of all codes to zero
Click to show internal directories.
Click to hide internal directories.