MCPcopy
hub / github.com/prometheus/client_golang / NewWriteResponse

Function NewWriteResponse

exp/api/remote/remote_headers.go:110–116  ·  view source on GitHub ↗

NewWriteResponse creates a new WriteResponse with empty stats and status code http.StatusNoContent.

()

Source from the content-addressed store, hash-verified

108
109// NewWriteResponse creates a new WriteResponse with empty stats and status code http.StatusNoContent.
110func NewWriteResponse() *WriteResponse {
111 return &WriteResponse{
112 WriteResponseStats: WriteResponseStats{},
113 statusCode: http.StatusNoContent,
114 extraHeaders: make(http.Header),
115 }
116}
117
118// Stats returns the current statistics.
119func (w *WriteResponse) Stats() WriteResponseStats {

Callers 1

TestWriteResponseFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestWriteResponseFunction · 0.68