/
githubmirror
/
ydb-go-sdk
Обзор
Документация
Войти
/
githubmirror
/
ydb-go-sdk
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
topic/topicoptions/topicoptions_topic.go
42 строки
2 KB
Aleksey Myasnikov
Moved the trace-generated code in `trace` package from the public API to the internal packages (#2172)
24 май 2026, 16:46
Не верифицирован
24 май 2026, 16:46
86fc0c2
Код
Авторство
О чём код?
package topicoptions import ( "time" "github.com/ydb-platform/ydb-go-sdk/v3/internal/topic" "github.com/ydb-platform/ydb-go-sdk/v3/trace" ) // TopicOption // // Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental type TopicOption = topic.Option // func(c *topic.Config) // WithTrace defines trace over persqueue client calls // // Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental func WithTrace(t trace.Topic) TopicOption { //nolint:gocritic return topic.PublicWithTrace(t) } // WithOperationTimeout set the maximum amount of time a YDB server will process // an operation. After timeout exceeds YDB will try to cancel operation and // regardless of the cancellation appropriate error will be returned to // the client. // If OperationTimeout is zero then no timeout is used. // // Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental func WithOperationTimeout(operationTimeout time.Duration) TopicOption { return topic.PublicWithOperationTimeout(operationTimeout) } // WithOperationCancelAfter set the maximum amount of time a YDB server will process an // operation. After timeout exceeds YDB will try to cancel operation and if // it succeeds appropriate error will be returned to the client; otherwise // processing will be continued. // If OperationCancelAfter is zero then no timeout is used. // // Experimental: https://github.com/ydb-platform/ydb-go-sdk/blob/master/VERSIONING.md#experimental func WithOperationCancelAfter(operationCancelAfter time.Duration) TopicOption { return topic.PublicWithOperationCancelAfter(operationCancelAfter) }