forked from TrueCloudLab/frostfs-api-go
Add v2
version to go module name
Replace all elements from `v2` to root directory. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
2d70391e31
commit
25da5d2e13
267 changed files with 116 additions and 17991 deletions
28
rpc/session.go
Normal file
28
rpc/session.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package rpc
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/client"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/rpc/common"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
)
|
||||
|
||||
const serviceSession = serviceNamePrefix + "session.SessionService"
|
||||
|
||||
const (
|
||||
rpcSessionCreate = "Create"
|
||||
)
|
||||
|
||||
func CreateSession(
|
||||
cli *client.Client,
|
||||
req *session.CreateRequest,
|
||||
opts ...client.CallOption,
|
||||
) (*session.CreateResponse, error) {
|
||||
resp := new(session.CreateResponse)
|
||||
|
||||
err := client.SendUnary(cli, common.CallMethodInfoUnary(serviceSession, rpcSessionCreate), req, resp, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue