https://github.com/lovi-cloud/go-targetd
Go binding of open-iscsi/targetd
https://github.com/lovi-cloud/go-targetd
golang-bindings golang-sdk iscsi open-iscsi targetd
Last synced: 5 months ago
JSON representation
Go binding of open-iscsi/targetd
- Host: GitHub
- URL: https://github.com/lovi-cloud/go-targetd
- Owner: lovi-cloud
- License: mit
- Created: 2020-12-22T05:51:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-11-03T13:32:48.000Z (over 4 years ago)
- Last Synced: 2023-07-27T22:19:40.698Z (almost 3 years ago)
- Topics: golang-bindings, golang-sdk, iscsi, open-iscsi, targetd
- Language: Go
- Homepage: https://pkg.go.dev/github.com/lovi-cloud/go-targetd/targetd
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-targetd
Go binding of [open-iscsi/targetd](https://github.com/open-iscsi/targetd) API.
## Usage
`targetd.yaml`
```yaml
user: "foo"
password: bar
ssl: false
```
```go
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)
}
```