Add SetAccountURI method to ACME client

Signed-off-by: James Munnelly <james@munnelly.eu>
This commit is contained in:
James Munnelly 2019-01-16 23:45:43 +00:00
parent 3767a6df23
commit 1bbfac4dff

View File

@ -90,6 +90,15 @@ type Client struct {
accountURL string
}
// SetAccountURL will set the account URL cached by the client.
// This should be used with caution, in order to reduce the number of calls
// made to the 'new-acct' endpoint in 'cacheAccountURL'
func (c *Client) SetAccountURL(url string) {
c.urlMu.Lock()
defer c.urlMu.Unlock()
c.accountURL = url
}
// Discover performs ACME server discovery using c.DirectoryURL.
//
// It caches successful result. So, subsequent calls will not result in