Should we add node address utils in SDK? #153

Open
opened 2025-12-28 18:07:14 +00:00 by sami · 3 comments
Owner

Originally created by @rkonfj on GitHub (Feb 21, 2023).

Like this:
nspcc-dev/neofs-node@d4b108d806/pkg/network/address.go

Originally created by @rkonfj on GitHub (Feb 21, 2023). Like this: https://github.com/nspcc-dev/neofs-node/blob/d4b108d8065f8268a988cf3966e181f02e1e5af7/pkg/network/address.go
Author
Owner

@rkonfj commented on GitHub (Feb 21, 2023):

Such a scene:

  1. get address from command line arg
    nspcc-dev/neofs-s3-gw@74f31c3149/cmd/s3-gw/app.go (L121)
  2. dial this address directly
    nspcc-dev/neofs-s3-gw@74f31c3149/internal/neofs/tree.go (L95)

If the command line needs to support multiaddr, where and how to parse it?

@rkonfj commented on GitHub (Feb 21, 2023): Such a scene: 1. get address from command line arg https://github.com/nspcc-dev/neofs-s3-gw/blob/74f31c31498f397ee415f92d1883349c8400947c/cmd/s3-gw/app.go#L121 2. dial this address directly https://github.com/nspcc-dev/neofs-s3-gw/blob/74f31c31498f397ee415f92d1883349c8400947c/internal/neofs/tree.go#L95 If the command line needs to support `multiaddr`, where and how to parse it?
Author
Owner

@roman-khimov commented on GitHub (Jun 21, 2023):

I guess what you need is https://pkg.go.dev/github.com/nspcc-dev/neofs-api-go/v2/rpc/client#ParseURI
I'm not sure it should be a part of the SDK though, SDK provides a client that operates with https://pkg.go.dev/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.9/client#PrmDial.SetServerURI

@roman-khimov commented on GitHub (Jun 21, 2023): I guess what you need is https://pkg.go.dev/github.com/nspcc-dev/neofs-api-go/v2/rpc/client#ParseURI I'm not sure it should be a part of the SDK though, SDK provides a client that operates with https://pkg.go.dev/github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.9/client#PrmDial.SetServerURI
Author
Owner

@roman-khimov commented on GitHub (Dec 31, 2024):

Relevant for the node, https://github.com/nspcc-dev/neofs-node/pull/3057.

@roman-khimov commented on GitHub (Dec 31, 2024): Relevant for the node, https://github.com/nspcc-dev/neofs-node/pull/3057.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-sdk-go#153
No description provided.