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