Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for CommitBinary (0.09 sec)

  1. cmd/peer-rest-common.go

    	peerRESTPath          = peerRESTPrefix + peerRESTVersionPrefix
    )
    
    const (
    	peerRESTMethodHealth                = "/health"
    	peerRESTMethodVerifyBinary          = "/verifybinary"
    	peerRESTMethodCommitBinary          = "/commitbinary"
    	peerRESTMethodStartProfiling        = "/startprofiling"
    	peerRESTMethodDownloadProfilingData = "/downloadprofilingdata"
    	peerRESTMethodSpeedTest             = "/speedtest"
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 09 16:58:30 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. cmd/update.go

    			StatusCode: http.StatusInternalServerError,
    		}
    	}
    
    	return nil
    }
    
    func commitBinary() (err error) {
    	if !updateInProgress.CompareAndSwap(0, 1) {
    		return errors.New("update already in progress")
    	}
    	defer updateInProgress.Store(0)
    
    	opts := selfupdate.Options{}
    
    	if err = selfupdate.CommitBinary(opts); err != nil {
    		if rerr := selfupdate.RollbackError(err); rerr != nil {
    			return AdminError{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 18.7K bytes
    - Viewed (0)
  3. cmd/admin-handlers.go

    			for idx, client := range globalNotificationSys.peerClients {
    				if failedClients[idx] {
    					continue
    				}
    				client := client
    				ng.Go(ctx, func() error {
    					return client.CommitBinary(ctx)
    				}, idx, *client.host)
    			}
    
    			for _, nerr := range ng.Wait() {
    				if nerr.Err != nil {
    					prs, ok := peerResults[nerr.Host.String()]
    					if ok {
    						prs.Err = nerr.Err.Error()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 99.7K bytes
    - Viewed (0)
  4. cmd/peer-rest-client.go

    	if err != nil {
    		return err
    	}
    	defer xhttp.DrainBody(respBody)
    	return nil
    }
    
    // CommitBinary - sends commit binary message to remote peers.
    func (client *peerRESTClient) CommitBinary(ctx context.Context) error {
    	respBody, err := client.callWithContext(ctx, peerRESTMethodCommitBinary, nil, nil, -1)
    	if err != nil {
    		return err
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 09 16:58:30 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  5. cmd/notification.go

    			return client.VerifyBinary(ctx, u, sha256Sum, releaseInfo, bytes.NewReader(bin))
    		}, idx, *client.host)
    	}
    	return ng.Wait()
    }
    
    // CommitBinary - asks remote peers to overwrite the old binary with the new one
    func (sys *NotificationSys) CommitBinary(ctx context.Context) []NotificationPeerErr {
    	ng := WithNPeers(len(sys.peerClients))
    	for idx, client := range sys.peerClients {
    		if client == nil {
    			continue
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Sep 09 16:58:30 UTC 2024
    - 46.2K bytes
    - Viewed (0)
  6. cmd/peer-rest-server.go

    		s.writeErrorResponse(w, err)
    		return
    	}
    }
    
    // CommitBinary - overwrites the current binary with the new one.
    func (s *peerRESTServer) CommitBinaryHandler(w http.ResponseWriter, r *http.Request) {
    	if !s.IsValid(w, r) {
    		s.writeErrorResponse(w, errors.New("Invalid request"))
    		return
    	}
    
    	if err := commitBinary(); err != nil {
    		s.writeErrorResponse(w, err)
    		return
    	}
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Oct 04 11:32:32 UTC 2024
    - 53.2K bytes
    - Viewed (0)
Back to top