optimize the perf and support more features

This commit is contained in:
Lei Xue
2026-03-14 11:45:35 +08:00
parent 7e7ebacd9d
commit 00cfac3d24
56 changed files with 6340 additions and 1019 deletions

View File

@@ -23,9 +23,9 @@ import (
"golang.org/x/net/context"
)
// TargetCreate creates a target in the SCSI Target.
func (cli *Client) TargetList(ctx context.Context, options api.TargetListOptions) ([]api.SCSITarget, error) {
var targets []api.SCSITarget
// TargetList lists targets in the SCSI Target.
func (cli *Client) TargetList(ctx context.Context, options api.TargetListOptions) ([]*api.SCSITarget, error) {
var targets []*api.SCSITarget
var query = url.Values{}
if options.Name != "" {
query.Set("name", options.Name)