github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/trace/query.go (about)

     1  package trace
     2  
     3  import "context"
     4  
     5  // tool gtrace used from ./internal/cmd/gtrace
     6  
     7  //go:generate gtrace
     8  
     9  type (
    10  	// Query specified trace of retry call activity.
    11  	// gtrace:gen
    12  	Query struct {
    13  		OnDo   func(QueryDoStartInfo) func(info QueryDoIntermediateInfo) func(QueryDoDoneInfo)
    14  		OnDoTx func(QueryDoTxStartInfo) func(info QueryDoTxIntermediateInfo) func(QueryDoTxDoneInfo)
    15  	}
    16  
    17  	QueryDoStartInfo 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  		Call    call
    24  
    25  		Label      string
    26  		Idempotent bool
    27  		NestedCall bool // flag when Retry called inside head Retry
    28  	}
    29  	QueryDoIntermediateInfo struct {
    30  		Error error
    31  	}
    32  	QueryDoDoneInfo struct {
    33  		Attempts int
    34  		Error    error
    35  	}
    36  	QueryDoTxStartInfo struct {
    37  		// Context make available context in trace callback function.
    38  		// Pointer to context provide replacement of context in trace callback function.
    39  		// Warning: concurrent access to pointer on client side must be excluded.
    40  		// Safe replacement of context are provided only inside callback function
    41  		Context *context.Context
    42  		Call    call
    43  
    44  		Label      string
    45  		Idempotent bool
    46  		NestedCall bool // flag when Retry called inside head Retry
    47  	}
    48  	QueryDoTxIntermediateInfo struct {
    49  		Error error
    50  	}
    51  	QueryDoTxDoneInfo struct {
    52  		Attempts int
    53  		Error    error
    54  	}
    55  )