frostfs-api-go/rpc/session.go
Alex Vanin f69d2ad83c Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 13:42:36 +03:00

28 lines
661 B
Go

package rpc
import (
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/client"
"git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/rpc/common"
"git.frostfs.info/TrueCloudLab/frostfs-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
}