go-targetd

module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2021 License: MIT

README

go-targetd

Go binding of open-iscsi/targetd API.

Usage

targetd.yaml

user: "foo"
password: bar
ssl: false
package main

import (
	"context"
	"fmt"
	"log"
	
	"github.com/lovi-cloud/go-targetd/targetd"
)

func main() {
	ctx := context.Background()
	
	client, err := targetd.New("http://192.0.2.1:18700", "foo", "bar", nil, nil)
	if err != nil {
		log.Fatal(err)
	}
	
	pools, err := client.GetPoolList(ctx)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", pools)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL