Documentation ¶
Index ¶
- func ClearContext(x interface{}) interface{}
- func DiscoveryOnDiscover(t Discovery, c *context.Context, address string, database string) func(location string, endpoints []EndpointInfo, _ error)
- func DiscoveryOnWhoAmI(t Discovery, c *context.Context) func(user string, groups []string, _ error)
- func DriverOnClose(t Driver, c *context.Context) func(error)
- func DriverOnClusterClose(t Driver, c *context.Context) func(error)
- func DriverOnClusterGet(t Driver, c *context.Context) func(endpoint EndpointInfo, _ error)
- func DriverOnClusterInit(t Driver, c *context.Context) func(error)
- func DriverOnClusterInsert(t Driver, c *context.Context, endpoint EndpointInfo) func(inserted bool, state ConnState)
- func DriverOnClusterRemove(t Driver, c *context.Context, endpoint EndpointInfo) func(state ConnState, removed bool)
- func DriverOnClusterUpdate(t Driver, c *context.Context, endpoint EndpointInfo) func(state ConnState)
- func DriverOnConnClose(t Driver, c *context.Context, endpoint EndpointInfo) func(error)
- func DriverOnConnInvoke(t Driver, c *context.Context, endpoint EndpointInfo, m Method) func(_ error, issues []Issue, opID string, state ConnState)
- func DriverOnConnNewStream(t Driver, c *context.Context, endpoint EndpointInfo, m Method) func(error) func(state ConnState, _ error)
- func DriverOnConnPark(t Driver, c *context.Context, endpoint EndpointInfo) func(error)
- func DriverOnConnStateChange(t Driver, endpoint EndpointInfo, state ConnState) func(state ConnState)
- func DriverOnConnTake(t Driver, c *context.Context, endpoint EndpointInfo) func(error)
- func DriverOnConnUsagesChange(t Driver, endpoint EndpointInfo, usages int)
- func DriverOnGetCredentials(t Driver, c *context.Context) func(token string, _ error)
- func DriverOnInit(t Driver, c *context.Context, endpoint string, database string, secure bool) func(error)
- func DriverOnNetClose(t Driver, address string) func(error)
- func DriverOnNetDial(t Driver, c *context.Context, address string) func(error)
- func DriverOnNetRead(t Driver, address string, buffer int) func(received int, _ error)
- func DriverOnNetWrite(t Driver, address string, bytes int) func(sent int, _ error)
- func DriverOnPessimizeNode(t Driver, c *context.Context, endpoint EndpointInfo, state ConnState, ...) func(state ConnState)
- func DriverOnRepeaterWakeUp(t Driver, c *context.Context, name string, event string) func(error)
- func DriverOnResolve(t Driver, target string, resolved []string) func(error)
- func RetryOnRetry(t Retry, c context.Context, iD string, idempotent bool) func(error) func(attempts int, _ error)
- func ScriptingOnExecute(t Scripting, c context.Context, query string, parameters queryParameters) func(result result, _ error)
- func ScriptingOnExplain(t Scripting, c *context.Context, session sessionInfo, query string) func(aST string, plan string, _ error)
- func ScriptingOnStreamExecute(t Scripting, c context.Context, query string, parameters queryParameters) func(error) func(error)
- func Stub(x interface{}, f func(name string, args ...interface{}))
- func TableOnPoolClose(t Table, c *context.Context) func(error)
- func TableOnPoolDo(t Table, c *context.Context, idempotent bool) func(error) func(attempts int, _ error)
- func TableOnPoolDoTx(t Table, c *context.Context, idempotent bool) func(error) func(attempts int, _ error)
- func TableOnPoolGet(t Table, c *context.Context) func(session sessionInfo, attempts int, _ error)
- func TableOnPoolInit(t Table, c *context.Context) func(limit int, keepAliveMinSize int)
- func TableOnPoolPut(t Table, c *context.Context, session sessionInfo) func(error)
- func TableOnPoolSessionClose(t Table, c *context.Context, session sessionInfo) func()
- func TableOnPoolSessionNew(t Table, c *context.Context) func(session sessionInfo, _ error)
- func TableOnPoolStateChange(t Table, size int, event string)
- func TableOnPoolWait(t Table, c *context.Context) func(session sessionInfo, _ error)
- func TableOnSessionDelete(t Table, c *context.Context, session sessionInfo) func(error)
- func TableOnSessionKeepAlive(t Table, c *context.Context, session sessionInfo) func(error)
- func TableOnSessionNew(t Table, c *context.Context) func(session sessionInfo, _ error)
- func TableOnSessionQueryExecute(t Table, c *context.Context, session sessionInfo, query dataQuery, ...) func(tx transactionInfo, prepared bool, result result, _ error)
- func TableOnSessionQueryExplain(t Table, c *context.Context, session sessionInfo, query string) func(aST string, plan string, _ error)
- func TableOnSessionQueryPrepare(t Table, c *context.Context, session sessionInfo, query string) func(result dataQuery, _ error)
- func TableOnSessionQueryStreamExecute(t Table, c *context.Context, session sessionInfo, query dataQuery, ...) func(error) func(error)
- func TableOnSessionQueryStreamRead(t Table, c *context.Context, session sessionInfo) func(error) func(error)
- func TableOnSessionTransactionBegin(t Table, c *context.Context, session sessionInfo) func(tx transactionInfo, _ error)
- func TableOnSessionTransactionCommit(t Table, c *context.Context, session sessionInfo, tx transactionInfo) func(error)
- func TableOnSessionTransactionRollback(t Table, c *context.Context, session sessionInfo, tx transactionInfo) func(error)
- func WithDefaultDetails(defaultDetails Details) matchDetailsOption
- func WithDriver(ctx context.Context, t Driver) context.Context
- func WithPOSIXMatch() matchDetailsOption
- func WithRetry(ctx context.Context, t Retry) context.Context
- func WithTable(ctx context.Context, t Table) context.Context
- type CloseDoneInfo
- type CloseStartInfo
- type ClusterCloseDoneInfo
- type ClusterCloseStartInfo
- type ClusterGetDoneInfo
- type ClusterGetStartInfo
- type ClusterInitDoneInfo
- type ClusterInitStartInfo
- type ClusterInsertDoneInfo
- type ClusterInsertStartInfo
- type ClusterRemoveDoneInfo
- type ClusterRemoveStartInfo
- type ClusterUpdateDoneInfo
- type ClusterUpdateStartInfo
- type ConnCloseDoneInfo
- type ConnCloseStartInfo
- type ConnInvokeDoneInfo
- type ConnInvokeStartInfo
- type ConnNewStreamDoneInfo
- type ConnNewStreamRecvInfo
- type ConnNewStreamStartInfo
- type ConnParkDoneInfo
- type ConnParkStartInfo
- type ConnState
- type ConnStateChangeDoneInfo
- type ConnStateChangeStartInfo
- type ConnTakeDoneInfo
- type ConnTakeStartInfo
- type ConnUsagesChangeInfo
- type Coordination
- type Details
- type DiscoverDoneInfo
- type DiscoverStartInfo
- type Discovery
- type Driver
- type EndpointInfo
- type ExecuteDataQueryDoneInfo
- type ExecuteDataQueryStartInfo
- type ExecuteDoneInfo
- type ExecuteStartInfo
- type ExplainQueryDoneInfo
- type ExplainQueryStartInfo
- type FieldStubber
- type GetCredentialsDoneInfo
- type GetCredentialsStartInfo
- type InitDoneInfo
- type InitStartInfo
- type Issue
- type KeepAliveDoneInfo
- type KeepAliveStartInfo
- type Method
- type NetCloseDoneInfo
- type NetCloseStartInfo
- type NetDialDoneInfo
- type NetDialStartInfo
- type NetReadDoneInfo
- type NetReadStartInfo
- type NetWriteDoneInfo
- type NetWriteStartInfo
- type PessimizeNodeDoneInfo
- type PessimizeNodeStartInfo
- type PooStateChangeInfo
- type PoolCloseDoneInfo
- type PoolCloseStartInfo
- type PoolDoDoneInfo
- type PoolDoIntermediateInfo
- type PoolDoStartInfo
- type PoolDoTxDoneInfo
- type PoolDoTxIntermediateInfo
- type PoolDoTxStartInfo
- type PoolGetDoneInfo
- type PoolGetStartInfo
- type PoolInitDoneInfo
- type PoolInitStartInfo
- type PoolPutDoneInfo
- type PoolPutStartInfo
- type PoolSessionCloseDoneInfo
- type PoolSessionCloseStartInfo
- type PoolSessionNewDoneInfo
- type PoolSessionNewStartInfo
- type PoolWaitDoneInfo
- type PoolWaitStartInfo
- type PrepareDataQueryDoneInfo
- type PrepareDataQueryStartInfo
- type Ratelimiter
- type RepeaterTickDoneInfo
- type RepeaterTickStartInfo
- type ResolveDoneInfo
- type ResolveStartInfo
- type Retry
- type RetryLoopDoneInfo
- type RetryLoopIntermediateInfo
- type RetryLoopStartInfo
- type Scheme
- type Scripting
- type SessionDeleteDoneInfo
- type SessionDeleteStartInfo
- type SessionNewDoneInfo
- type SessionNewStartInfo
- type SessionQueryStreamExecuteDoneInfo
- type SessionQueryStreamExecuteIntermediateInfo
- type SessionQueryStreamExecuteStartInfo
- type SessionQueryStreamReadDoneInfo
- type SessionQueryStreamReadIntermediateInfo
- type SessionQueryStreamReadStartInfo
- type SessionTransactionBeginDoneInfo
- type SessionTransactionBeginStartInfo
- type SessionTransactionCommitDoneInfo
- type SessionTransactionCommitStartInfo
- type SessionTransactionRollbackDoneInfo
- type SessionTransactionRollbackStartInfo
- type StreamExecuteDoneInfo
- type StreamExecuteIntermediateInfo
- type StreamExecuteStartInfo
- type Table
- type WhoAmIDoneInfo
- type WhoAmIStartInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearContext ¶
func ClearContext(x interface{}) interface{}
func DiscoveryOnDiscover ¶ added in v3.10.0
func DiscoveryOnWhoAmI ¶ added in v3.10.0
func DriverOnClusterClose ¶ added in v3.11.0
func DriverOnClusterGet ¶
func DriverOnClusterGet(t Driver, c *context.Context) func(endpoint EndpointInfo, _ error)
func DriverOnClusterInit ¶ added in v3.11.0
func DriverOnClusterInsert ¶
func DriverOnClusterRemove ¶
func DriverOnClusterUpdate ¶
func DriverOnClusterUpdate(t Driver, c *context.Context, endpoint EndpointInfo) func(state ConnState)
func DriverOnConnClose ¶ added in v3.12.1
func DriverOnConnClose(t Driver, c *context.Context, endpoint EndpointInfo) func(error)
func DriverOnConnInvoke ¶
func DriverOnConnNewStream ¶
func DriverOnConnPark ¶ added in v3.12.1
func DriverOnConnPark(t Driver, c *context.Context, endpoint EndpointInfo) func(error)
func DriverOnConnStateChange ¶
func DriverOnConnStateChange(t Driver, endpoint EndpointInfo, state ConnState) func(state ConnState)
func DriverOnConnTake ¶
func DriverOnConnTake(t Driver, c *context.Context, endpoint EndpointInfo) func(error)
func DriverOnConnUsagesChange ¶ added in v3.11.8
func DriverOnConnUsagesChange(t Driver, endpoint EndpointInfo, usages int)
func DriverOnGetCredentials ¶
func DriverOnInit ¶ added in v3.5.0
func DriverOnNetClose ¶
func DriverOnNetDial ¶
func DriverOnNetRead ¶
func DriverOnNetWrite ¶
func DriverOnPessimizeNode ¶
func DriverOnRepeaterWakeUp ¶ added in v3.11.13
func DriverOnResolve ¶ added in v3.11.0
func RetryOnRetry ¶
func ScriptingOnExecute ¶ added in v3.10.0
func ScriptingOnExplain ¶ added in v3.10.0
func ScriptingOnStreamExecute ¶ added in v3.10.0
func Stub ¶
func Stub(x interface{}, f func(name string, args ...interface{}))
Stub is a helper function that stubs all functional fields of x with given f.
func TableOnPoolDo ¶ added in v3.8.0
func TableOnPoolDoTx ¶ added in v3.8.0
func TableOnPoolGet ¶
func TableOnPoolInit ¶
func TableOnPoolPut ¶
func TableOnPoolSessionClose ¶
func TableOnPoolSessionNew ¶
func TableOnPoolStateChange ¶ added in v3.11.0
func TableOnPoolWait ¶
func TableOnSessionDelete ¶
func TableOnSessionKeepAlive ¶
func TableOnSessionNew ¶
func TableOnSessionQueryExplain ¶ added in v3.10.0
func WithDefaultDetails ¶ added in v3.11.0
func WithDefaultDetails(defaultDetails Details) matchDetailsOption
func WithDriver ¶
WithDriver returns deadline which has associated Driver with it.
func WithPOSIXMatch ¶ added in v3.11.0
func WithPOSIXMatch() matchDetailsOption
Types ¶
type CloseDoneInfo ¶ added in v3.5.0
type CloseDoneInfo struct {
Error error
}
type CloseStartInfo ¶ added in v3.5.0
type CloseStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }
type ClusterCloseDoneInfo ¶ added in v3.11.0
type ClusterCloseDoneInfo struct {
Error error
}
type ClusterCloseStartInfo ¶ added in v3.11.0
type ClusterCloseStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }
type ClusterGetDoneInfo ¶
type ClusterGetDoneInfo struct { Endpoint EndpointInfo Error error }
type ClusterGetStartInfo ¶
type ClusterGetStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }
type ClusterInitDoneInfo ¶ added in v3.11.0
type ClusterInitDoneInfo struct {
Error error
}
type ClusterInitStartInfo ¶ added in v3.11.0
type ClusterInitStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }
type ClusterInsertDoneInfo ¶
type ClusterInsertStartInfo ¶
type ClusterInsertStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Endpoint EndpointInfo }
type ClusterRemoveDoneInfo ¶
type ClusterRemoveStartInfo ¶
type ClusterRemoveStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Endpoint EndpointInfo }
type ClusterUpdateDoneInfo ¶
type ClusterUpdateDoneInfo struct {
State ConnState
}
type ClusterUpdateStartInfo ¶
type ClusterUpdateStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Endpoint EndpointInfo }
type ConnCloseDoneInfo ¶ added in v3.12.1
type ConnCloseDoneInfo struct {
Error error
}
type ConnCloseStartInfo ¶ added in v3.12.1
type ConnCloseStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Endpoint EndpointInfo }
type ConnInvokeDoneInfo ¶
type ConnInvokeStartInfo ¶
type ConnInvokeStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Endpoint EndpointInfo Method Method }
type ConnNewStreamDoneInfo ¶
type ConnNewStreamRecvInfo ¶
type ConnNewStreamRecvInfo struct {
Error error
}
type ConnNewStreamStartInfo ¶
type ConnNewStreamStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Endpoint EndpointInfo Method Method }
type ConnParkDoneInfo ¶ added in v3.12.1
type ConnParkDoneInfo struct {
Error error
}
type ConnParkStartInfo ¶ added in v3.12.1
type ConnParkStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Endpoint EndpointInfo }
type ConnStateChangeDoneInfo ¶
type ConnStateChangeDoneInfo struct {
State ConnState
}
type ConnStateChangeStartInfo ¶
type ConnStateChangeStartInfo struct { Endpoint EndpointInfo State ConnState }
type ConnTakeDoneInfo ¶
type ConnTakeDoneInfo struct {
Error error
}
type ConnTakeStartInfo ¶
type ConnTakeStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Endpoint EndpointInfo }
type ConnUsagesChangeInfo ¶ added in v3.11.8
type ConnUsagesChangeInfo struct { Endpoint EndpointInfo Usages int }
type Coordination ¶ added in v3.10.0
type Coordination struct{}
func (Coordination) Compose ¶ added in v3.10.0
func (t Coordination) Compose(x Coordination) (ret Coordination)
Compose returns a new Coordination which has functional fields composed both from t and x.
type Details ¶ added in v3.2.1
type Details uint64
const ( DriverNetEvents Details = 1 << iota // 1 DriverConnEvents // 2 DriverClusterEvents // 4 DriverResolverEvents // 8 DriverRepeaterEvents // 16 DriverCredentialsEvents // 32 TableSessionLifeCycleEvents // 64 TableSessionQueryInvokeEvents // 128 TableSessionQueryStreamEvents // 256 TableSessionTransactionEvents // 512 TablePoolLifeCycleEvents // 1024 TablePoolRetryEvents // 2048 TablePoolSessionLifeCycleEvents // 4096 TablePoolAPIEvents // 8192 DiscoveryEvents // 16384 SchemeEvents // 32768 ScriptingEvents // 65536 RatelimiterEvents // 131072 CoordinationEvents // 262144 RetryEvents // 524288 DriverEvents = DriverNetEvents | DriverConnEvents | DriverClusterEvents | DriverResolverEvents | DriverRepeaterEvents | DriverCredentialsEvents // 63 TableEvents = TableSessionLifeCycleEvents | TableSessionQueryInvokeEvents | TableSessionQueryStreamEvents | TableSessionTransactionEvents | TablePoolLifeCycleEvents | TablePoolRetryEvents | TablePoolSessionLifeCycleEvents | TablePoolAPIEvents // 16320 TablePoolEvents = TablePoolLifeCycleEvents | TablePoolRetryEvents | TablePoolSessionLifeCycleEvents | TablePoolAPIEvents // 15360 TableSessionQueryEvents = TableSessionQueryInvokeEvents | TableSessionQueryStreamEvents // 384 TableSessionEvents = TableSessionLifeCycleEvents | TableSessionQueryEvents | TableSessionTransactionEvents // 960 DetailsAll = ^Details(0) // 18446744073709551615 )
func MatchDetails ¶ added in v3.11.0
type DiscoverDoneInfo ¶ added in v3.10.0
type DiscoverDoneInfo struct { Location string Endpoints []EndpointInfo Error error }
type DiscoverStartInfo ¶ added in v3.10.0
type DiscoverStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Address string Database string }
type Discovery ¶ added in v3.10.0
type Discovery struct { OnDiscover func(DiscoverStartInfo) func(DiscoverDoneInfo) OnWhoAmI func(WhoAmIStartInfo) func(WhoAmIDoneInfo) }
type Driver ¶
type Driver struct { // Driver runtime events OnInit func(InitStartInfo) func(InitDoneInfo) OnClose func(CloseStartInfo) func(CloseDoneInfo) // Network events OnNetRead func(NetReadStartInfo) func(NetReadDoneInfo) OnNetWrite func(NetWriteStartInfo) func(NetWriteDoneInfo) OnNetDial func(NetDialStartInfo) func(NetDialDoneInfo) OnNetClose func(NetCloseStartInfo) func(NetCloseDoneInfo) // Resolver events OnResolve func(ResolveStartInfo) func(ResolveDoneInfo) // Conn events OnConnStateChange func(ConnStateChangeStartInfo) func(ConnStateChangeDoneInfo) OnConnInvoke func(ConnInvokeStartInfo) func(ConnInvokeDoneInfo) OnConnNewStream func(ConnNewStreamStartInfo) func(ConnNewStreamRecvInfo) func(ConnNewStreamDoneInfo) OnConnTake func(ConnTakeStartInfo) func(ConnTakeDoneInfo) OnConnUsagesChange func(ConnUsagesChangeInfo) OnConnPark func(ConnParkStartInfo) func(ConnParkDoneInfo) OnConnClose func(ConnCloseStartInfo) func(ConnCloseDoneInfo) // Cluster events OnClusterInit func(ClusterInitStartInfo) func(ClusterInitDoneInfo) OnClusterClose func(ClusterCloseStartInfo) func(ClusterCloseDoneInfo) OnClusterGet func(ClusterGetStartInfo) func(ClusterGetDoneInfo) OnClusterInsert func(ClusterInsertStartInfo) func(ClusterInsertDoneInfo) OnClusterUpdate func(ClusterUpdateStartInfo) func(ClusterUpdateDoneInfo) OnClusterRemove func(ClusterRemoveStartInfo) func(ClusterRemoveDoneInfo) OnPessimizeNode func(PessimizeNodeStartInfo) func(PessimizeNodeDoneInfo) // Repeater events OnRepeaterWakeUp func(RepeaterTickStartInfo) func(RepeaterTickDoneInfo) // Credentials events OnGetCredentials func(GetCredentialsStartInfo) func(GetCredentialsDoneInfo) }
func ContextDriver ¶
ContextDriver returns Driver associated with ctx. If there is no Driver associated with ctx then zero value of Driver is returned.
type EndpointInfo ¶ added in v3.11.8
type ExecuteDataQueryDoneInfo ¶ added in v3.10.0
type ExecuteDataQueryStartInfo ¶
type ExecuteDataQueryStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Session sessionInfo Query dataQuery Parameters queryParameters }
type ExecuteDoneInfo ¶ added in v3.10.0
type ExecuteDoneInfo struct { Result result Error error }
type ExecuteStartInfo ¶ added in v3.10.0
type ExplainQueryDoneInfo ¶ added in v3.10.0
type ExplainQueryStartInfo ¶ added in v3.10.0
type FieldStubber ¶
type FieldStubber struct { // OnStub is an optional callback that is called when field getting // stubbed. OnStub func(name string) // OnCall is an optional callback that will be called for each stubbed // field getting called. OnCall func(name string, args ...interface{}) }
FieldStubber contains options of filling all struct functional fields.
func (FieldStubber) Stub ¶
func (f FieldStubber) Stub(x reflect.Value)
Stub fills in given x struct.
type GetCredentialsDoneInfo ¶
type GetCredentialsStartInfo ¶
type GetCredentialsStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }
type InitDoneInfo ¶ added in v3.5.0
type InitDoneInfo struct {
Error error
}
type InitStartInfo ¶ added in v3.5.0
type InitStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Endpoint string Database string Secure bool }
type KeepAliveDoneInfo ¶
type KeepAliveDoneInfo struct {
Error error
}
type KeepAliveStartInfo ¶
type KeepAliveStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Session sessionInfo }
type NetCloseDoneInfo ¶
type NetCloseDoneInfo struct {
Error error
}
type NetCloseStartInfo ¶
type NetCloseStartInfo struct {
Address string
}
type NetDialDoneInfo ¶
type NetDialDoneInfo struct {
Error error
}
type NetDialStartInfo ¶
type NetDialStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Address string }
type NetReadDoneInfo ¶
type NetReadStartInfo ¶
type NetWriteDoneInfo ¶
type NetWriteStartInfo ¶
type PessimizeNodeDoneInfo ¶
type PessimizeNodeDoneInfo struct {
State ConnState
}
type PessimizeNodeStartInfo ¶
type PessimizeNodeStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Endpoint EndpointInfo State ConnState Cause error }
type PooStateChangeInfo ¶ added in v3.11.0
type PoolCloseDoneInfo ¶
type PoolCloseDoneInfo struct {
Error error
}
type PoolCloseStartInfo ¶
type PoolCloseStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }
type PoolDoDoneInfo ¶ added in v3.8.0
type PoolDoIntermediateInfo ¶ added in v3.10.0
type PoolDoIntermediateInfo struct {
Error error
}
type PoolDoStartInfo ¶ added in v3.8.0
type PoolDoStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Idempotent bool }
type PoolDoTxDoneInfo ¶ added in v3.8.0
type PoolDoTxIntermediateInfo ¶ added in v3.10.0
type PoolDoTxIntermediateInfo struct {
Error error
}
type PoolDoTxStartInfo ¶ added in v3.8.0
type PoolDoTxStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Idempotent bool }
type PoolGetDoneInfo ¶
type PoolGetStartInfo ¶
type PoolGetStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }
type PoolInitDoneInfo ¶
type PoolInitStartInfo ¶
type PoolInitStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }
type PoolPutDoneInfo ¶
type PoolPutDoneInfo struct {
Error error
}
type PoolPutStartInfo ¶
type PoolPutStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Session sessionInfo }
type PoolSessionCloseDoneInfo ¶
type PoolSessionCloseDoneInfo struct{}
type PoolSessionCloseStartInfo ¶
type PoolSessionCloseStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Session sessionInfo }
type PoolSessionNewDoneInfo ¶
type PoolSessionNewDoneInfo struct { Session sessionInfo Error error }
type PoolSessionNewStartInfo ¶
type PoolSessionNewStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }
type PoolWaitDoneInfo ¶
type PoolWaitDoneInfo struct { Session sessionInfo Error error }
PoolWaitDoneInfo means a wait iteration inside Get call is done Warning: Session and Error may be nil at the same time. This means that a wait iteration donned without any significant resultErr
type PoolWaitStartInfo ¶
type PoolWaitStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }
type PrepareDataQueryDoneInfo ¶
type PrepareDataQueryDoneInfo struct { Result dataQuery Error error }
type PrepareDataQueryStartInfo ¶ added in v3.10.0
type PrepareDataQueryStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Session sessionInfo Query string }
type Ratelimiter ¶ added in v3.10.0
type Ratelimiter struct{}
func (Ratelimiter) Compose ¶ added in v3.10.0
func (t Ratelimiter) Compose(x Ratelimiter) (ret Ratelimiter)
Compose returns a new Ratelimiter which has functional fields composed both from t and x.
type RepeaterTickDoneInfo ¶ added in v3.11.13
type RepeaterTickDoneInfo struct {
Error error
}
type RepeaterTickStartInfo ¶ added in v3.11.13
type RepeaterTickStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Name string Event string }
type ResolveDoneInfo ¶ added in v3.11.0
type ResolveDoneInfo struct {
Error error
}
type ResolveStartInfo ¶ added in v3.11.0
type Retry ¶
type Retry struct {
OnRetry func(RetryLoopStartInfo) func(RetryLoopIntermediateInfo) func(RetryLoopDoneInfo)
}
func ContextRetry ¶
ContextRetry returns Retry associated with ctx. If there is no Retry associated with ctx then zero value of Retry is returned.
type RetryLoopDoneInfo ¶
type RetryLoopIntermediateInfo ¶ added in v3.10.0
type RetryLoopIntermediateInfo struct {
Error error
}
type RetryLoopStartInfo ¶
type Scripting ¶ added in v3.10.0
type Scripting struct { OnExecute func(ExecuteStartInfo) func(ExecuteDoneInfo) OnStreamExecute func(StreamExecuteStartInfo) func(StreamExecuteIntermediateInfo) func(StreamExecuteDoneInfo) OnExplain func(info ExplainQueryStartInfo) func(doneInfo ExplainQueryDoneInfo) }
type SessionDeleteDoneInfo ¶
type SessionDeleteDoneInfo struct {
Error error
}
type SessionDeleteStartInfo ¶
type SessionDeleteStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Session sessionInfo }
type SessionNewDoneInfo ¶
type SessionNewDoneInfo struct { Session sessionInfo Error error }
type SessionNewStartInfo ¶
type SessionNewStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }
type SessionQueryStreamExecuteDoneInfo ¶
type SessionQueryStreamExecuteDoneInfo struct {
Error error
}
type SessionQueryStreamExecuteIntermediateInfo ¶ added in v3.10.0
type SessionQueryStreamExecuteIntermediateInfo struct {
Error error
}
type SessionQueryStreamExecuteStartInfo ¶
type SessionQueryStreamExecuteStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Session sessionInfo Query dataQuery Parameters queryParameters }
type SessionQueryStreamReadDoneInfo ¶
type SessionQueryStreamReadDoneInfo struct {
Error error
}
type SessionQueryStreamReadIntermediateInfo ¶ added in v3.10.0
type SessionQueryStreamReadIntermediateInfo struct {
Error error
}
type SessionQueryStreamReadStartInfo ¶
type SessionQueryStreamReadStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Session sessionInfo }
type SessionTransactionBeginDoneInfo ¶
type SessionTransactionBeginDoneInfo struct { Tx transactionInfo Error error }
type SessionTransactionBeginStartInfo ¶
type SessionTransactionBeginStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Session sessionInfo }
type SessionTransactionCommitDoneInfo ¶
type SessionTransactionCommitDoneInfo struct {
Error error
}
type SessionTransactionCommitStartInfo ¶
type SessionTransactionCommitStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Session sessionInfo Tx transactionInfo }
type SessionTransactionRollbackDoneInfo ¶
type SessionTransactionRollbackDoneInfo struct {
Error error
}
type SessionTransactionRollbackStartInfo ¶
type SessionTransactionRollbackStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context Session sessionInfo Tx transactionInfo }
type StreamExecuteDoneInfo ¶ added in v3.10.0
type StreamExecuteDoneInfo struct {
Error error
}
type StreamExecuteIntermediateInfo ¶ added in v3.10.0
type StreamExecuteIntermediateInfo struct {
Error error
}
type StreamExecuteStartInfo ¶ added in v3.10.0
type Table ¶
type Table struct { // Session events OnSessionNew func(SessionNewStartInfo) func(SessionNewDoneInfo) OnSessionDelete func(SessionDeleteStartInfo) func(SessionDeleteDoneInfo) OnSessionKeepAlive func(KeepAliveStartInfo) func(KeepAliveDoneInfo) // Query events OnSessionQueryPrepare func(PrepareDataQueryStartInfo) func(PrepareDataQueryDoneInfo) OnSessionQueryExecute func(ExecuteDataQueryStartInfo) func(ExecuteDataQueryDoneInfo) OnSessionQueryExplain func(ExplainQueryStartInfo) func(ExplainQueryDoneInfo) // Stream events OnSessionQueryStreamExecute func( SessionQueryStreamExecuteStartInfo, ) func( SessionQueryStreamExecuteIntermediateInfo, ) func( SessionQueryStreamExecuteDoneInfo, ) OnSessionQueryStreamRead func( SessionQueryStreamReadStartInfo, ) func( SessionQueryStreamReadIntermediateInfo, ) func( SessionQueryStreamReadDoneInfo, ) // Transaction events OnSessionTransactionBegin func(SessionTransactionBeginStartInfo) func(SessionTransactionBeginDoneInfo) OnSessionTransactionCommit func(SessionTransactionCommitStartInfo) func(SessionTransactionCommitDoneInfo) OnSessionTransactionRollback func(SessionTransactionRollbackStartInfo) func(SessionTransactionRollbackDoneInfo) // Pool events OnPoolInit func(PoolInitStartInfo) func(PoolInitDoneInfo) OnPoolClose func(PoolCloseStartInfo) func(PoolCloseDoneInfo) // Pool state event OnPoolStateChange func(PooStateChangeInfo) // Pool retry events OnPoolDo func(PoolDoStartInfo) func(info PoolDoIntermediateInfo) func(PoolDoDoneInfo) OnPoolDoTx func(PoolDoTxStartInfo) func(info PoolDoTxIntermediateInfo) func(PoolDoTxDoneInfo) // Pool session lifecycle events OnPoolSessionNew func(PoolSessionNewStartInfo) func(PoolSessionNewDoneInfo) OnPoolSessionClose func(PoolSessionCloseStartInfo) func(PoolSessionCloseDoneInfo) // Pool common API events OnPoolPut func(PoolPutStartInfo) func(PoolPutDoneInfo) OnPoolGet func(PoolGetStartInfo) func(PoolGetDoneInfo) OnPoolWait func(PoolWaitStartInfo) func(PoolWaitDoneInfo) }
Table contains options for tracing table client activity.
func ContextTable ¶
ContextTable returns Table associated with ctx. If there is no Table associated with ctx then zero value of Trace is returned.
type WhoAmIDoneInfo ¶ added in v3.10.0
type WhoAmIStartInfo ¶ added in v3.10.0
type WhoAmIStartInfo struct { // Context make available context in trace callback function. // Pointer to context provide replacement of context in trace callback function. // Warning: concurrent access to pointer on client side must be excluded. // Safe replacement of context are provided only inside callback function Context *context.Context }