k3s/vendor/github.com/quobyte/api
Jeff Grafton 653d05c169 Regenerate all BUILD files in vendor/ from scratch using gazelle 2017-08-16 15:48:25 -07:00
..
BUILD Regenerate all BUILD files in vendor/ from scratch using gazelle 2017-08-16 15:48:25 -07:00
LICENSE add vendor code 2016-09-16 13:26:18 +02:00
README.md Update Quobyte API repo 2017-06-29 12:15:22 +02:00
quobyte.go Update Quobyte API repo 2017-06-29 12:15:22 +02:00
rpc_client.go add vendor code 2016-09-16 13:26:18 +02:00
types.go Update Quobyte API repo 2017-06-29 12:15:22 +02:00

README.md

Quobyte API Clients

Get the quoybte api client

go get github.com/quobyte/api

Usage

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)
}