Skip to content

nasty-project/nasty-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nasty-go

Go client library for the NASty storage API. Communicates over WebSocket using JSON-RPC 2.0.

Used by the NASty CSI driver to manage filesystems, subvolumes, snapshots, and sharing protocols (NFS, SMB, iSCSI, NVMe-oF) on a NASty appliance.

Usage

import nastygo "github.com/nasty-project/nasty-go"

client, err := nastygo.NewClient("wss://nasty.local/ws", "your-api-key", true)
if err != nil {
    log.Fatal(err)
}
defer client.Close()

// Create a subvolume
subvol, err := client.CreateSubvolume(ctx, nastygo.SubvolumeCreateParams{
    Filesystem:    "storage",
    Name:          "my-volume",
    SubvolumeType: "filesystem",
})

Structure

  • client.go — WebSocket client with reconnection and JSON-RPC transport
  • interface.go — API types and client interface definition
  • properties.go — CSI xattr property keys and helpers
  • dashboard/ — In-cluster CSI dashboard data types

About

Go client for the NASty storage API

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages