diff options
Diffstat (limited to 'pkg/bindings/system/system.go')
-rw-r--r-- | pkg/bindings/system/system.go | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/pkg/bindings/system/system.go b/pkg/bindings/system/system.go index e567e7a86..5348d0cfb 100644 --- a/pkg/bindings/system/system.go +++ b/pkg/bindings/system/system.go @@ -112,29 +112,16 @@ func Version(ctx context.Context) (*entities.SystemVersionReport, error) { f, _ := strconv.ParseFloat(component.APIVersion, 64) b, _ := time.Parse(time.RFC3339, component.BuildTime) report.Server = &define.Version{ - RemoteAPIVersion: int64(f), - Version: component.Version.Version, - GoVersion: component.GoVersion, - GitCommit: component.GitCommit, - Built: b.Unix(), - OsArch: fmt.Sprintf("%s/%s", component.Os, component.Arch), + APIVersion: int64(f), + Version: component.Version.Version, + GoVersion: component.GoVersion, + GitCommit: component.GitCommit, + Built: b.Unix(), + OsArch: fmt.Sprintf("%s/%s", component.Os, component.Arch), } return &report, err } -// Reset removes all unused system data. -func Reset(ctx context.Context) error { - conn, err := bindings.GetClient(ctx) - if err != nil { - return err - } - response, err := conn.DoRequest(nil, http.MethodPost, "/system/reset", nil) - if err != nil { - return err - } - return response.Process(response) -} - // DiskUsage returns information about image, container, and volume disk // consumption func DiskUsage(ctx context.Context) (*entities.SystemDfReport, error) { |