Add health.SetReadyProvider function to operate on defaultState, to be served by DefaultServer.
Initially we intended to simply set the ReadyProvider if desired as
health.DefaultServer.State.ReadyProvider = r
However, if the DefaultServer isn't already instantiated via
health.RegisterWithHTTP|GRPC
this can lead to unwanted race conditions and nilpointer exceptions.
Instead health.SetReadyProvider operates on the private globally
initialised defaultState.
Add health.SetReadyProvider function to operate on defaultState, to be served by DefaultServer. Initially we intended to simply set the ReadyProvider if desired as
However, if the DefaultServer isn't already instantiated via
this can lead to unwanted race conditions and nilpointer exceptions. Instead health.SetReadyProvider operates on the private globally initialised defaultState.