Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for downloadBinary (0.96 sec)

  1. cmd/update.go

    			StatusCode: http.StatusInternalServerError,
    		}
    	}
    	return resp.Body, nil
    }
    
    var updateInProgress atomic.Uint32
    
    // Function to get the reader from an architecture
    func downloadBinary(u *url.URL, mode string) (binCompressed []byte, bin []byte, err error) {
    	transport := getUpdateTransport(30 * time.Second)
    	var reader io.ReadCloser
    	if u.Scheme == "https" || u.Scheme == "http" {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  2. cmd/admin-handlers.go

    	if err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    	u.Path = path.Dir(u.Path) + SlashSeparator + releaseInfo
    	// Download Binary Once
    	binC, bin, err := downloadBinary(u, mode)
    	if err != nil {
    		adminLogIf(ctx, fmt.Errorf("server update failed with %w", err))
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 98K bytes
    - Viewed (0)
Back to top