package topic

import "github.com/ydb-platform/ydb-go-sdk/v3/internal/topic"

Index

Constants

const (
	DefaultStartTimeout = value.InfiniteDuration
)

Variables

var (
	PublicRetryDecisionDefault = PublicCheckRetryResult{/* contains filtered or unexported fields */}
	PublicRetryDecisionRetry   = PublicCheckRetryResult{/* contains filtered or unexported fields */}
	PublicRetryDecisionStop    = PublicCheckRetryResult{/* contains filtered or unexported fields */} //nolint:gomnd
)

Functions

func CheckResetReconnectionCounters

func CheckResetReconnectionCounters(lastTry, now time.Time, connectionTimeout time.Duration) bool

func OperationParamsFromConfig

func OperationParamsFromConfig(operationParams *rawydb.OperationParams, cfg *config.Common)

func RetryDecision

func RetryDecision(checkErr error, settings RetrySettings, retriesDuration time.Duration) (
	_ backoff.Backoff,
	stopRetryReason error,
)

RetryDecision check if err is retriable. if return nil stopRetryReason - err can be retried if return non nil stopRetryReason - err is not retriable and stopRetryReason contains reason, which should be used instead of err

Types

type Config

type Config struct {
	config.Common
	Trace              *trace.Topic
	MaxGrpcMessageSize int
}

type Option

type Option func(c *Config)

func PublicWithOperationCancelAfter

func PublicWithOperationCancelAfter(operationCancelAfter time.Duration) Option

func PublicWithOperationTimeout

func PublicWithOperationTimeout(operationTimeout time.Duration) Option

func PublicWithTrace

func PublicWithTrace(trace trace.Topic, opts ...trace.TopicComposeOption) Option

func WithGrpcMessageSize

func WithGrpcMessageSize(sizeBytes int) Option

type PublicCheckErrorRetryArgs

type PublicCheckErrorRetryArgs struct {
	Error error
}

func NewCheckRetryArgs

func NewCheckRetryArgs(err error) PublicCheckErrorRetryArgs

type PublicCheckErrorRetryFunction

type PublicCheckErrorRetryFunction func(errInfo PublicCheckErrorRetryArgs) PublicCheckRetryResult

type PublicCheckRetryResult

type PublicCheckRetryResult struct {
	// contains filtered or unexported fields
}

type RetrySettings

type RetrySettings struct {
	StartTimeout time.Duration // Full retry timeout
	CheckError   PublicCheckErrorRetryFunction
}

Source Files

configs.go convertors.go retriable_error.go

Directories

PathSynopsis
internal/topic/topicclientinternal
internal/topic/topiclistenerinternal
internal/topic/topicreadercommon
internal/topic/topicreaderinternal
internal/topic/topicwriterinternal
Version
v3.104.1
Published
Mar 17, 2025
Platform
js/wasm
Imports
11 packages
Last checked
15 minutes ago

Tools for package owners.