This release adds support for injecting extra headers.
This release adds support for creating a handler that performs content negotiation between JSON and text output.
This release adds support for the Delete, Put, and Patch methods.
This release adds the ability to switch request bodies to the www-urlencoded
encoding for the purposes of OAuth2 authentication.
This release explicitly adds the "Accept" header on client requests.
This release tags the first stable version for the ContainerSSH 0.4.0 release.
Added the onReady hook to allow implementing services to directly inject ready handlers. Also added configurable server TLS settings.
This release cleans up the message codes being emitted.
This release fixes a validation bug introduced in the previous version where TLS parameters were validated even if the URL didn't point to a https://
URL.
This release adds configurable TLS versions, ciphers, ECDH curves, as well as transitioning to the unified logging interface.
This release adds a Validate()
method to both the client and the server configuration. This will allow for a central validation of the entire configuration structure.
This release removes the previously erroneously added context handling.
This release includes two changes:
- The
Post()
method now accepts a context variable as its first parameter for timeout handling. - The
Post()
method now exclusively returns ahttp.ClientError
, which includes the reason for failure.
This release changes the Url
variable for the client to URL
. It also bumps the log dependency to the latest release.
This release changes the API of the HTTP server to integrate with the Service library. The public interface now requires using the Lifecycle
object to start and stop the server. The Lifecycle
also allows adding hooks for lifecycle events.
server, err := http.NewServer(
"service name",
http.ServerConfiguration{
//...
},
handler,
logger,
)
if err != nil {
// Handle configuration error
}
// Lifecycle from the github.com/containerssh/service package
lifecycle := service.NewLifecycle(server)
//Add an event hook
lifecycle.OnRunning(...)
go func() {
if err := lifecycle.Run(); err != nil {
// Handle error
}
}()
// Do something else, then shut down the server.
// You can pass a context for the shutdown deadline.
lifecycle.Shutdown(context.Background())
This is the initial release of the library.