package
1.10.0
Repository: https://github.com/azure/azure-sdk-for-go.git
Documentation: pkg.go.dev

# Functions

NewServer creates a new Server object.
NewTLSServer creates a new Server object and applies any additional ServerOption configurations provided on the Server.
NewTrackedCloser is similar to io.NopCloser but tracks that Close was called.
WithBody sets the HTTP response's body to the specified value.
WithBodyReadError returns a response that will fail when reading the body.
WithHeader adds the specified header and value to the HTTP response.
WithHTTP2Enabled sets the HTTP2Enabled field on the testserver to the boolean value provided.
WithPredicate invokes the specified predicate func on the HTTP request.
WithSlowResponse will sleep for the specified duration before returning the HTTP response.
WithStatusCode sets the HTTP response's status code to the specified value.
WithTLSConfig sets the given TLS config on server.
No description provided by the author

# Structs

Server is a wrapper around an httptest.Server.

# Interfaces

ResponseOption is an abstraction for configuring a mock HTTP response.
ServerOption is an abstraction for configuring a mock Server.

# Type aliases

ResponsePredicate is a predicate that's invoked in response to an HTTP request.
TrackedClose, when invoked, returns true if Close was called.