Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseWithLogOnError ¶
CloseWithLogOnError will close the given resource and log any relevant failure
func ContextCloserWithLogOnError ¶ added in v0.3.24
func ContextCloserWithLogOnError(ctx context.Context, name string, c CloseWithContext)
ContextCloserWithLogOnError will close the given resource using the context and log any relevant failure
func DrainAndCloseWithLogOnError ¶
func DrainAndCloseWithLogOnError(ctx context.Context, name string, c io.ReadCloser)
DrainAndCloseWithLogOnError will first ensure the contents of the reader has been read before being closed. This is useful when dealing with HTTP response bodies which need to be drained and closed so that the connection may be reused by the OS.
Types ¶
type CloseWithContext ¶ added in v0.3.24
Click to show internal directories.
Click to hide internal directories.