22 lines
406 B
Go
22 lines
406 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"forge.cadoles.com/arcad/arcast/pkg/server"
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
func (c *Client) Reset(ctx context.Context, addr string) (*Status, error) {
|
|
endpoint := fmt.Sprintf("http://%s/api/v1/cast", addr)
|
|
|
|
res := &server.StatusResponse{}
|
|
|
|
if err := c.apiDelete(ctx, endpoint, nil, &res); err != nil {
|
|
return nil, errors.WithStack(err)
|
|
}
|
|
|
|
return res, nil
|
|
}
|