kubernetes/vendor/github.com/quobyte/api
Johannes Scheuermann 74fde1893e Add bazel build file
2017-06-30 20:41:56 +02:00
..
BUILD Add bazel build file 2017-06-30 20:41:56 +02:00
LICENSE add vendor code 2016-09-16 13:26:18 +02:00
quobyte.go Update Quobyte API repo 2017-06-29 12:15:22 +02:00
README.md 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

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