github.com/ydb-platform/ydb-go-sdk/v3@v3.57.0/trace/discovery.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 // Discovery specified trace of discovery client activity. 11 // gtrace:gen 12 Discovery struct { 13 OnDiscover func(DiscoveryDiscoverStartInfo) func(DiscoveryDiscoverDoneInfo) 14 OnWhoAmI func(DiscoveryWhoAmIStartInfo) func(DiscoveryWhoAmIDoneInfo) 15 } 16 DiscoveryDiscoverStartInfo struct { 17 // Context make available context in trace callback function. 18 // Pointer to context provide replacement of context in trace callback function. 19 // Warning: concurrent access to pointer on client side must be excluded. 20 // Safe replacement of context are provided only inside callback function 21 Context *context.Context 22 Call call 23 Address string 24 Database string 25 } 26 DiscoveryDiscoverDoneInfo struct { 27 Location string 28 Endpoints []EndpointInfo 29 Error error 30 } 31 DiscoveryWhoAmIStartInfo struct { 32 // Context make available context in trace callback function. 33 // Pointer to context provide replacement of context in trace callback function. 34 // Warning: concurrent access to pointer on client side must be excluded. 35 // Safe replacement of context are provided only inside callback function 36 Context *context.Context 37 Call call 38 } 39 DiscoveryWhoAmIDoneInfo struct { 40 User string 41 Groups []string 42 Error error 43 } 44 )