Documentation
¶
Index ¶
- func ClientEndpoint(ctx context.Context) string
- func ClientEndpointToContext(ctx context.Context, endpoint string) context.Context
- func ServerEndpoint(ctx context.Context) string
- func ServerEndpointToContext(ctx context.Context, endpoint string) context.Context
- type ClientStorage
- type ServerStorage
- func (s *ServerStorage) CountStatusCode(method string, endpoint string, code int)
- func (s *ServerStorage) ObserveDuration(method string, endpoint string, duration time.Duration)
- func (s *ServerStorage) ObserveRequestBodySize(method string, endpoint string, size int)
- func (s *ServerStorage) ObserveResponseBodySize(method string, endpoint string, size int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientEndpoint ¶ added in v1.22.0
func ClientEndpointToContext ¶ added in v1.22.0
func ServerEndpoint ¶ added in v1.22.0
Types ¶
type ClientStorage ¶ added in v1.12.0
type ClientStorage struct {
// contains filtered or unexported fields
}
func NewClientStorage ¶ added in v1.12.0
func NewClientStorage(reg *metrics.Registry) *ClientStorage
func (*ClientStorage) ObserveDuration ¶ added in v1.12.0
func (s *ClientStorage) ObserveDuration(endpoint string, duration time.Duration)
type ServerStorage ¶ added in v1.12.0
type ServerStorage struct {
// contains filtered or unexported fields
}
func NewServerStorage ¶ added in v1.12.0
func NewServerStorage(reg *metrics.Registry) *ServerStorage
func (*ServerStorage) CountStatusCode ¶ added in v1.12.0
func (s *ServerStorage) CountStatusCode(method string, endpoint string, code int)
func (*ServerStorage) ObserveDuration ¶ added in v1.12.0
func (s *ServerStorage) ObserveDuration(method string, endpoint string, duration time.Duration)
func (*ServerStorage) ObserveRequestBodySize ¶ added in v1.12.0
func (s *ServerStorage) ObserveRequestBodySize(method string, endpoint string, size int)
func (*ServerStorage) ObserveResponseBodySize ¶ added in v1.12.0
func (s *ServerStorage) ObserveResponseBodySize(method string, endpoint string, size int)
Click to show internal directories.
Click to hide internal directories.