github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/trace/retry.go (about) 1 package trace 2 3 // tool gtrace used from ./internal/cmd/gtrace 4 5 //go:generate gtrace 6 7 import ( 8 "context" 9 ) 10 11 type ( 12 // Retry specified trace of retry call activity. 13 // gtrace:gen 14 Retry struct { 15 OnRetry func(RetryLoopStartInfo) func(RetryLoopIntermediateInfo) func(RetryLoopDoneInfo) 16 } 17 RetryLoopStartInfo struct { 18 // Context make available context in trace callback function. 19 // Pointer to context provide replacement of context in trace callback function. 20 // Warning: concurrent access to pointer on client side must be excluded. 21 // Safe replacement of context are provided only inside callback function 22 Context *context.Context 23 24 // Deprecated: use Label field instead 25 ID string 26 27 Call call 28 Label string 29 Idempotent bool 30 31 NestedCall bool // a sign for detect Retry calls inside head Retry 32 } 33 RetryLoopIntermediateInfo struct { 34 Error error 35 } 36 RetryLoopDoneInfo struct { 37 Attempts int 38 Error error 39 } 40 )