mirror of
				https://github.com/k3s-io/kubernetes.git
				synced 2025-10-31 13:50:01 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			35 lines
		
	
	
		
			628 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			628 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| # Quobyte API Clients
 | |
| 
 | |
| Get the quoybte api client
 | |
| 
 | |
| ```bash
 | |
| go get github.com/quobyte/api
 | |
| ```
 | |
| 
 | |
| ## Usage
 | |
| 
 | |
| ```go
 | |
| package main
 | |
| 
 | |
| import (
 | |
|   "log"
 | |
|   quobyte_api "github.com/quobyte/api"
 | |
| )
 | |
| 
 | |
| func main() {
 | |
|     client := quobyte_api.NewQuobyteClient("http://apiserver:7860", "user", "password")
 | |
|     req := &quobyte_api.CreateVolumeRequest{
 | |
|         Name:              "MyVolume",
 | |
|         RootUserID:        "root",
 | |
|         RootGroupID:       "root",
 | |
|         ConfigurationName: "BASE",
 | |
|     }
 | |
| 
 | |
|     volumeUUID, err := client.CreateVolume(req)
 | |
|     if err != nil {
 | |
|         log.Fatalf("Error:", err)
 | |
|     }
 | |
| 
 | |
|     log.Printf("%s", volumeUUID)
 | |
| }
 | |
| ``` |