Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. cmd/peer-rest-common.go

    	peerRESTPath          = peerRESTPrefix + peerRESTVersionPrefix
    )
    
    const (
    	peerRESTMethodHealth                = "/health"
    	peerRESTMethodVerifyBinary          = "/verifybinary"
    	peerRESTMethodCommitBinary          = "/commitbinary"
    	peerRESTMethodStartProfiling        = "/startprofiling"
    	peerRESTMethodDownloadProfilingData = "/downloadprofilingdata"
    	peerRESTMethodSpeedTest             = "/speedtest"
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 08 19:08:18 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  2. 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
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 12 18:13:36 GMT 2024
    - 44.5K bytes
    - Viewed (0)
  3. 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{
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 18.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
    	}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 25.8K bytes
    - Viewed (0)
  5. cmd/admin-handlers.go

    			for idx, client := range globalNotificationSys.peerClients {
    				_, ok := failedClients[idx]
    				if ok {
    					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()
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 97.3K bytes
    - Viewed (2)
  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
    	}
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 51.8K bytes
    - Viewed (0)
Back to top