k3s/vendor/github.com/quobyte/api
Silvan Kaiser cc71b0aebd Adding Tenant to QuobyteVolumeSource
Adds the tenant id to the QuobyteVolumeSource type and
updates the quobyte api client to support looking up
volume ids.
2019-01-22 14:42:12 +01:00
..
BUILD Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
LICENSE add vendor code 2016-09-16 13:26:18 +02:00
README.md Update Quobyte API 2017-10-26 15:09:37 +02:00
quobyte.go Adding Tenant to QuobyteVolumeSource 2019-01-22 14:42:12 +01:00
rpc_client.go Quobyte API update 2018-05-30 13:56:37 +02:00
types.go Quobyte API update 2018-05-30 13:56:37 +02:00

README.md

Quobyte API Clients

Get the quobyte 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")
    client.SetAPIRetryPolicy(quobyte_api.RetryInfinitely) // Default quobyte_api.RetryInteractive
    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)
}