@@ -7,70 +7,70 @@ import (
77 "github.com/ydb-platform/ydb-go-genproto/protos/Ydb_Coordination"
88)
99
10- // WithDescription returns an CreateSessionOption that specifies a user-defined description that may be used to describe
10+ // WithDescription returns an SessionOption that specifies a user-defined description that may be used to describe
1111// the client.
12- func WithDescription (description string ) CreateSessionOption {
12+ func WithDescription (description string ) SessionOption {
1313 return func (c * CreateSessionOptions ) {
1414 c .Description = description
1515 }
1616}
1717
18- // WithSessionTimeout returns an CreateSessionOption that specifies the timeout during which client may restore a
18+ // WithSessionTimeout returns an SessionOption that specifies the timeout during which client may restore a
1919// detached session. The client is forced to terminate the session if the last successful session request occurred
2020// earlier than this time.
2121//
2222// If this is not set, the client uses the default 5 seconds.
23- func WithSessionTimeout (timeout time.Duration ) CreateSessionOption {
23+ func WithSessionTimeout (timeout time.Duration ) SessionOption {
2424 return func (c * CreateSessionOptions ) {
2525 c .SessionTimeout = timeout
2626 }
2727}
2828
29- // WithSessionStartTimeout returns an CreateSessionOption that specifies the time that the client should wait for a
29+ // WithSessionStartTimeout returns an SessionOption that specifies the time that the client should wait for a
3030// response to the StartSession request from the server before it terminates the gRPC stream and tries to reconnect.
3131//
3232// If this is not set, the client uses the default time 1 second.
33- func WithSessionStartTimeout (timeout time.Duration ) CreateSessionOption {
33+ func WithSessionStartTimeout (timeout time.Duration ) SessionOption {
3434 return func (c * CreateSessionOptions ) {
3535 c .SessionStartTimeout = timeout
3636 }
3737}
3838
39- // WithSessionStopTimeout returns an CreateSessionOption that specifies the time that the client should wait for a
39+ // WithSessionStopTimeout returns an SessionOption that specifies the time that the client should wait for a
4040// response to the StopSession request from the server before it terminates the gRPC stream and tries to reconnect.
4141//
4242// If this is not set, the client uses the default time 1 second.
43- func WithSessionStopTimeout (timeout time.Duration ) CreateSessionOption {
43+ func WithSessionStopTimeout (timeout time.Duration ) SessionOption {
4444 return func (c * CreateSessionOptions ) {
4545 c .SessionStartTimeout = timeout
4646 }
4747}
4848
49- // WithSessionKeepAliveTimeout returns an CreateSessionOption that specifies the time that the client will wait before
49+ // WithSessionKeepAliveTimeout returns an SessionOption that specifies the time that the client will wait before
5050// it terminates the gRPC stream and tries to reconnect if no successful responses have been received from the server.
5151//
5252// If this is not set, the client uses the default time 10 seconds.
53- func WithSessionKeepAliveTimeout (timeout time.Duration ) CreateSessionOption {
53+ func WithSessionKeepAliveTimeout (timeout time.Duration ) SessionOption {
5454 return func (c * CreateSessionOptions ) {
5555 c .SessionKeepAliveTimeout = timeout
5656 }
5757}
5858
59- // WithSessionReconnectDelay returns an CreateSessionOption that specifies the time that the client will wait before it
59+ // WithSessionReconnectDelay returns an SessionOption that specifies the time that the client will wait before it
6060// tries to reconnect the underlying gRPC stream in case of error.
6161//
6262// If this is not set, the client uses the default time 500 milliseconds.
63- func WithSessionReconnectDelay (delay time.Duration ) CreateSessionOption {
63+ func WithSessionReconnectDelay (delay time.Duration ) SessionOption {
6464 return func (c * CreateSessionOptions ) {
6565 c .SessionReconnectDelay = delay
6666 }
6767}
6868
69- // CreateSessionOption configures how we create a new session.
70- type CreateSessionOption func (c * CreateSessionOptions )
69+ // SessionOption configures how we create a new session.
70+ type SessionOption func (c * CreateSessionOptions )
7171
72- // CreateSessionOptions configure an CreateSession call. CreateSessionOptions are set by the CreateSessionOption values
73- // passed to the CreateSession function.
72+ // CreateSessionOptions configure an Session call. CreateSessionOptions are set by the SessionOption values
73+ // passed to the Session function.
7474type CreateSessionOptions struct {
7575 Description string
7676 SessionTimeout time.Duration
0 commit comments