mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 18:48:08 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			318 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			318 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package api
 | |
| 
 | |
| import "context"
 | |
| 
 | |
| func (c *Sys) StepDown() error {
 | |
| 	r := c.c.NewRequest("PUT", "/v1/sys/step-down")
 | |
| 
 | |
| 	ctx, cancelFunc := context.WithCancel(context.Background())
 | |
| 	defer cancelFunc()
 | |
| 	resp, err := c.c.RawRequestWithContext(ctx, r)
 | |
| 	if resp != nil && resp.Body != nil {
 | |
| 		resp.Body.Close()
 | |
| 	}
 | |
| 	return err
 | |
| }
 | 
