mirror of
https://github.com/datarhei/core.git
synced 2025-10-17 05:20:40 +08:00
Add experimental LE certificate retrieval for cluster
This commit is contained in:
@@ -253,6 +253,12 @@ func (c *APIClient) Snapshot() (io.ReadCloser, error) {
|
||||
return c.stream(http.MethodGet, "/v1/snapshot", "", nil, "")
|
||||
}
|
||||
|
||||
func (c *APIClient) IsReady(origin string) error {
|
||||
_, err := c.call(http.MethodGet, "/v1/ready", "application/json", nil, origin)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
func (c *APIClient) stream(method, path, contentType string, data io.Reader, origin string) (io.ReadCloser, error) {
|
||||
if len(c.Address) == 0 {
|
||||
return nil, fmt.Errorf("no address defined")
|
||||
|
Reference in New Issue
Block a user