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 DriverOnConnRelease(t Driver, c *context.Context, endpoint EndpointInfo) func(error)
- func DriverOnConnStateChange(t Driver, endpoint EndpointInfo, state ConnState) func(state ConnState)
- func DriverOnConnStreamUsagesChange(t Driver, endpoint EndpointInfo, usages int)
- 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 ScriptingOnClose(t Scripting, c *context.Context) func(error)
- func ScriptingOnExecute(t Scripting, c *context.Context, query string, ...) func(result scriptingResult, _ error)
- func ScriptingOnExplain(t Scripting, c *context.Context, query string) func(plan string, _ error)
- func ScriptingOnStreamExecute(t Scripting, c *context.Context, query string, ...) func(error) func(error)
- func Stub(x interface{}, f func(name string, args ...interface{}))
- func TableOnClose(t Table, c *context.Context) func(error)
- func TableOnCreateSession(t Table, c *context.Context) func(error) func(session tableSessionInfo, attempts int, _ error)
- func TableOnDo(t Table, c *context.Context, idempotent bool) func(error) func(attempts int, _ error)
- func TableOnDoTx(t Table, c *context.Context, idempotent bool) func(error) func(attempts int, _ error)
- func TableOnInit(t Table, c *context.Context) func(limit int, keepAliveMinSize int)
- func TableOnPoolGet(t Table, c *context.Context) func(session tableSessionInfo, attempts int, _ error)
- func TableOnPoolPut(t Table, c *context.Context, session tableSessionInfo) func(error)
- func TableOnPoolSessionClose(t Table, c *context.Context, session tableSessionInfo) func()
- func TableOnPoolSessionNew(t Table, c *context.Context) func(session tableSessionInfo, _ error)
- func TableOnPoolStateChange(t Table, size int, event string)
- func TableOnPoolWait(t Table, c *context.Context) func(session tableSessionInfo, _ error)
- func TableOnSessionDelete(t Table, c *context.Context, session tableSessionInfo) func(error)
- func TableOnSessionKeepAlive(t Table, c *context.Context, session tableSessionInfo) func(error)
- func TableOnSessionNew(t Table, c *context.Context) func(session tableSessionInfo, _ error)
- func TableOnSessionQueryExecute(t Table, c *context.Context, session tableSessionInfo, query tableDataQuery, ...) func(tx tableTransactionInfo, prepared bool, result tableResult, _ error)
- func TableOnSessionQueryExplain(t Table, c *context.Context, session tableSessionInfo, query string) func(aST string, plan string, _ error)
- func TableOnSessionQueryPrepare(t Table, c *context.Context, session tableSessionInfo, query string) func(result tableDataQuery, _ error)
- func TableOnSessionQueryStreamExecute(t Table, c *context.Context, session tableSessionInfo, query tableDataQuery, ...) func(error) func(error)
- func TableOnSessionQueryStreamRead(t Table, c *context.Context, session tableSessionInfo) func(error) func(error)
- func TableOnSessionTransactionBegin(t Table, c *context.Context, session tableSessionInfo) func(tx tableTransactionInfo, _ error)
- func TableOnSessionTransactionCommit(t Table, c *context.Context, session tableSessionInfo, tx tableTransactionInfo) func(error)
- func TableOnSessionTransactionRollback(t Table, c *context.Context, session tableSessionInfo, tx tableTransactionInfo) 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 ConnState
- type Coordination
- type Details
- type Discovery
- type DiscoveryDiscoverDoneInfo
- type DiscoveryDiscoverStartInfo
- type DiscoveryWhoAmIDoneInfo
- type DiscoveryWhoAmIStartInfo
- type Driver
- type DriverCloseDoneInfo
- type DriverCloseStartInfo
- type DriverClusterCloseDoneInfo
- type DriverClusterCloseStartInfo
- type DriverClusterGetDoneInfo
- type DriverClusterGetStartInfo
- type DriverClusterInitDoneInfo
- type DriverClusterInitStartInfo
- type DriverClusterInsertDoneInfo
- type DriverClusterInsertStartInfo
- type DriverClusterRemoveDoneInfo
- type DriverClusterRemoveStartInfo
- type DriverClusterUpdateDoneInfo
- type DriverClusterUpdateStartInfo
- type DriverConnCloseDoneInfo
- type DriverConnCloseStartInfo
- type DriverConnInvokeDoneInfo
- type DriverConnInvokeStartInfo
- type DriverConnNewStreamDoneInfo
- type DriverConnNewStreamRecvInfo
- type DriverConnNewStreamStartInfo
- type DriverConnParkDoneInfo
- type DriverConnParkStartInfo
- type DriverConnReleaseDoneInfo
- type DriverConnReleaseStartInfo
- type DriverConnStateChangeDoneInfo
- type DriverConnStateChangeStartInfo
- type DriverConnStreamUsagesChangeInfo
- type DriverConnTakeDoneInfo
- type DriverConnTakeStartInfo
- type DriverConnUsagesChangeInfo
- type DriverGetCredentialsDoneInfo
- type DriverGetCredentialsStartInfo
- type DriverInitDoneInfo
- type DriverInitStartInfo
- type DriverNetCloseDoneInfo
- type DriverNetCloseStartInfo
- type DriverNetDialDoneInfo
- type DriverNetDialStartInfo
- type DriverNetReadDoneInfo
- type DriverNetReadStartInfo
- type DriverNetWriteDoneInfo
- type DriverNetWriteStartInfo
- type DriverPessimizeNodeDoneInfo
- type DriverPessimizeNodeStartInfo
- type DriverRepeaterTickDoneInfo
- type DriverRepeaterTickStartInfo
- type DriverResolveDoneInfo
- type DriverResolveStartInfo
- type EndpointInfo
- type FieldStubber
- type Issue
- type Method
- type Ratelimiter
- type Retry
- type RetryLoopDoneInfo
- type RetryLoopIntermediateInfo
- type RetryLoopStartInfo
- type Scheme
- type Scripting
- type ScriptingCloseDoneInfo
- type ScriptingCloseStartInfo
- type ScriptingExecuteDoneInfo
- type ScriptingExecuteStartInfo
- type ScriptingExplainDoneInfo
- type ScriptingExplainStartInfo
- type ScriptingStreamExecuteDoneInfo
- type ScriptingStreamExecuteIntermediateInfo
- type ScriptingStreamExecuteStartInfo
- type Table
- type TableCloseDoneInfo
- type TableCloseStartInfo
- type TableCreateSessionDoneInfo
- type TableCreateSessionIntermediateInfo
- type TableCreateSessionStartInfo
- type TableDoDoneInfo
- type TableDoIntermediateInfo
- type TableDoStartInfo
- type TableDoTxDoneInfo
- type TableDoTxIntermediateInfo
- type TableDoTxStartInfo
- type TableExecuteDataQueryDoneInfo
- type TableExecuteDataQueryStartInfo
- type TableExplainQueryDoneInfo
- type TableExplainQueryStartInfo
- type TableInitDoneInfo
- type TableInitStartInfo
- type TableKeepAliveDoneInfo
- type TableKeepAliveStartInfo
- type TablePooStateChangeInfo
- type TablePoolGetDoneInfo
- type TablePoolGetStartInfo
- type TablePoolPutDoneInfo
- type TablePoolPutStartInfo
- type TablePoolSessionCloseDoneInfo
- type TablePoolSessionCloseStartInfo
- type TablePoolSessionNewDoneInfo
- type TablePoolSessionNewStartInfo
- type TablePoolWaitDoneInfo
- type TablePoolWaitStartInfo
- type TablePrepareDataQueryDoneInfo
- type TablePrepareDataQueryStartInfo
- type TableSessionDeleteDoneInfo
- type TableSessionDeleteStartInfo
- type TableSessionNewDoneInfo
- type TableSessionNewStartInfo
- type TableSessionQueryStreamExecuteDoneInfo
- type TableSessionQueryStreamExecuteIntermediateInfo
- type TableSessionQueryStreamExecuteStartInfo
- type TableSessionQueryStreamReadDoneInfo
- type TableSessionQueryStreamReadIntermediateInfo
- type TableSessionQueryStreamReadStartInfo
- type TableSessionTransactionBeginDoneInfo
- type TableSessionTransactionBeginStartInfo
- type TableSessionTransactionCommitDoneInfo
- type TableSessionTransactionCommitStartInfo
- type TableSessionTransactionRollbackDoneInfo
- type TableSessionTransactionRollbackStartInfo
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 DriverOnConnRelease ¶
func DriverOnConnRelease(t Driver, c *context.Context, endpoint EndpointInfo) func(error)
func DriverOnConnStateChange ¶
func DriverOnConnStateChange(t Driver, endpoint EndpointInfo, state ConnState) func(state ConnState)
func DriverOnConnStreamUsagesChange ¶ added in v3.15.0
func DriverOnConnStreamUsagesChange(t Driver, endpoint EndpointInfo, usages int)
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 ScriptingOnClose ¶ added in v3.13.1
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 TableOnCreateSession ¶ added in v3.15.0
func TableOnDoTx ¶ added in v3.15.0
func TableOnInit ¶ added in v3.13.1
func TableOnPoolGet ¶
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 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 TablePoolSessionLifeCycleEvents // 2048 TablePoolAPIEvents // 4096 RetryEvents // 8192 DiscoveryEvents // 16384 SchemeEvents // 32768 ScriptingEvents // 65536 RatelimiterEvents // 131072 CoordinationEvents // 262144 DriverEvents = DriverNetEvents | DriverConnEvents | DriverClusterEvents | DriverResolverEvents | DriverRepeaterEvents | DriverCredentialsEvents // 63 TableEvents = TableSessionLifeCycleEvents | TableSessionQueryInvokeEvents | TableSessionQueryStreamEvents | TableSessionTransactionEvents | TablePoolLifeCycleEvents | TablePoolSessionLifeCycleEvents | TablePoolAPIEvents // 16320 TablePoolEvents = TablePoolLifeCycleEvents | TablePoolSessionLifeCycleEvents | TablePoolAPIEvents // 15360 TableSessionQueryEvents = TableSessionQueryInvokeEvents | TableSessionQueryStreamEvents // 384 TableSessionEvents = TableSessionLifeCycleEvents | TableSessionQueryEvents | TableSessionTransactionEvents // 960 DetailsAll = ^Details(0) // 18446744073709551615 )
func MatchDetails ¶ added in v3.11.0
type Discovery ¶ added in v3.10.0
type Discovery struct { OnDiscover func(DiscoveryDiscoverStartInfo) func(DiscoveryDiscoverDoneInfo) OnWhoAmI func(DiscoveryWhoAmIStartInfo) func(DiscoveryWhoAmIDoneInfo) }
type DiscoveryDiscoverDoneInfo ¶ added in v3.15.0
type DiscoveryDiscoverDoneInfo struct { Location string Endpoints []EndpointInfo Error error }
type DiscoveryDiscoverStartInfo ¶ added in v3.15.0
type DiscoveryDiscoverStartInfo 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 DiscoveryWhoAmIDoneInfo ¶ added in v3.15.0
type DiscoveryWhoAmIStartInfo ¶ added in v3.15.0
type DiscoveryWhoAmIStartInfo 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 Driver ¶
type Driver struct { // Driver runtime events OnInit func(DriverInitStartInfo) func(DriverInitDoneInfo) OnClose func(DriverCloseStartInfo) func(DriverCloseDoneInfo) // Network events OnNetRead func(DriverNetReadStartInfo) func(DriverNetReadDoneInfo) OnNetWrite func(DriverNetWriteStartInfo) func(DriverNetWriteDoneInfo) OnNetDial func(DriverNetDialStartInfo) func(DriverNetDialDoneInfo) OnNetClose func(DriverNetCloseStartInfo) func(DriverNetCloseDoneInfo) // Resolver events OnResolve func(DriverResolveStartInfo) func(DriverResolveDoneInfo) // Conn events OnConnStateChange func(DriverConnStateChangeStartInfo) func(DriverConnStateChangeDoneInfo) OnConnInvoke func(DriverConnInvokeStartInfo) func(DriverConnInvokeDoneInfo) OnConnNewStream func( DriverConnNewStreamStartInfo, ) func( DriverConnNewStreamRecvInfo, ) func( DriverConnNewStreamDoneInfo, ) OnConnTake func(DriverConnTakeStartInfo) func(DriverConnTakeDoneInfo) OnConnUsagesChange func(DriverConnUsagesChangeInfo) OnConnStreamUsagesChange func(DriverConnStreamUsagesChangeInfo) OnConnPark func(DriverConnParkStartInfo) func(DriverConnParkDoneInfo) OnConnClose func(DriverConnCloseStartInfo) func(DriverConnCloseDoneInfo) OnConnRelease func(DriverConnReleaseStartInfo) func(DriverConnReleaseDoneInfo) // Cluster events OnClusterInit func(DriverClusterInitStartInfo) func(DriverClusterInitDoneInfo) OnClusterClose func(DriverClusterCloseStartInfo) func(DriverClusterCloseDoneInfo) OnClusterGet func(DriverClusterGetStartInfo) func(DriverClusterGetDoneInfo) OnClusterInsert func(DriverClusterInsertStartInfo) func(DriverClusterInsertDoneInfo) OnClusterUpdate func(DriverClusterUpdateStartInfo) func(DriverClusterUpdateDoneInfo) OnClusterRemove func(DriverClusterRemoveStartInfo) func(DriverClusterRemoveDoneInfo) OnPessimizeNode func(DriverPessimizeNodeStartInfo) func(DriverPessimizeNodeDoneInfo) // Repeater events OnRepeaterWakeUp func(DriverRepeaterTickStartInfo) func(DriverRepeaterTickDoneInfo) // Credentials events OnGetCredentials func(DriverGetCredentialsStartInfo) func(DriverGetCredentialsDoneInfo) }
func ContextDriver ¶
ContextDriver returns Driver associated with ctx. If there is no Driver associated with ctx then zero value of Driver is returned.
type DriverCloseDoneInfo ¶ added in v3.15.0
type DriverCloseDoneInfo struct {
Error error
}
type DriverCloseStartInfo ¶ added in v3.15.0
type DriverCloseStartInfo 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 DriverClusterCloseDoneInfo ¶ added in v3.15.0
type DriverClusterCloseDoneInfo struct {
Error error
}
type DriverClusterCloseStartInfo ¶ added in v3.15.0
type DriverClusterCloseStartInfo 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 DriverClusterGetDoneInfo ¶ added in v3.15.0
type DriverClusterGetDoneInfo struct { Endpoint EndpointInfo Error error }
type DriverClusterGetStartInfo ¶ added in v3.15.0
type DriverClusterGetStartInfo 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 DriverClusterInitDoneInfo ¶ added in v3.15.0
type DriverClusterInitDoneInfo struct {
Error error
}
type DriverClusterInitStartInfo ¶ added in v3.15.0
type DriverClusterInitStartInfo 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 DriverClusterInsertDoneInfo ¶ added in v3.15.0
type DriverClusterInsertStartInfo ¶ added in v3.15.0
type DriverClusterInsertStartInfo 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 DriverClusterRemoveDoneInfo ¶ added in v3.15.0
type DriverClusterRemoveStartInfo ¶ added in v3.15.0
type DriverClusterRemoveStartInfo 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 DriverClusterUpdateDoneInfo ¶ added in v3.15.0
type DriverClusterUpdateDoneInfo struct {
State ConnState
}
type DriverClusterUpdateStartInfo ¶ added in v3.15.0
type DriverClusterUpdateStartInfo 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 DriverConnCloseDoneInfo ¶ added in v3.15.0
type DriverConnCloseDoneInfo struct {
Error error
}
type DriverConnCloseStartInfo ¶ added in v3.15.0
type DriverConnCloseStartInfo 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 DriverConnInvokeDoneInfo ¶ added in v3.15.0
type DriverConnInvokeStartInfo ¶ added in v3.15.0
type DriverConnInvokeStartInfo 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 DriverConnNewStreamDoneInfo ¶ added in v3.15.0
type DriverConnNewStreamRecvInfo ¶ added in v3.15.0
type DriverConnNewStreamRecvInfo struct {
Error error
}
type DriverConnNewStreamStartInfo ¶ added in v3.15.0
type DriverConnNewStreamStartInfo 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 DriverConnParkDoneInfo ¶ added in v3.15.0
type DriverConnParkDoneInfo struct {
Error error
}
type DriverConnParkStartInfo ¶ added in v3.15.0
type DriverConnParkStartInfo 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 DriverConnReleaseDoneInfo ¶ added in v3.15.0
type DriverConnReleaseDoneInfo struct {
Error error
}
type DriverConnReleaseStartInfo ¶ added in v3.15.0
type DriverConnReleaseStartInfo 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 DriverConnStateChangeDoneInfo ¶ added in v3.15.0
type DriverConnStateChangeDoneInfo struct {
State ConnState
}
type DriverConnStateChangeStartInfo ¶ added in v3.15.0
type DriverConnStateChangeStartInfo struct { Endpoint EndpointInfo State ConnState }
type DriverConnStreamUsagesChangeInfo ¶ added in v3.15.0
type DriverConnStreamUsagesChangeInfo struct { Endpoint EndpointInfo Usages int }
type DriverConnTakeDoneInfo ¶ added in v3.15.0
type DriverConnTakeDoneInfo struct {
Error error
}
type DriverConnTakeStartInfo ¶ added in v3.15.0
type DriverConnTakeStartInfo 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 DriverConnUsagesChangeInfo ¶ added in v3.15.0
type DriverConnUsagesChangeInfo struct { Endpoint EndpointInfo Usages int }
type DriverGetCredentialsDoneInfo ¶ added in v3.15.0
type DriverGetCredentialsStartInfo ¶ added in v3.15.0
type DriverGetCredentialsStartInfo 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 DriverInitDoneInfo ¶ added in v3.15.0
type DriverInitDoneInfo struct {
Error error
}
type DriverInitStartInfo ¶ added in v3.15.0
type DriverInitStartInfo 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 DriverNetCloseDoneInfo ¶ added in v3.15.0
type DriverNetCloseDoneInfo struct {
Error error
}
type DriverNetCloseStartInfo ¶ added in v3.15.0
type DriverNetCloseStartInfo struct {
Address string
}
type DriverNetDialDoneInfo ¶ added in v3.15.0
type DriverNetDialDoneInfo struct {
Error error
}
type DriverNetDialStartInfo ¶ added in v3.15.0
type DriverNetDialStartInfo 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 DriverNetReadDoneInfo ¶ added in v3.15.0
type DriverNetReadStartInfo ¶ added in v3.15.0
type DriverNetWriteDoneInfo ¶ added in v3.15.0
type DriverNetWriteStartInfo ¶ added in v3.15.0
type DriverPessimizeNodeDoneInfo ¶ added in v3.15.0
type DriverPessimizeNodeDoneInfo struct {
State ConnState
}
type DriverPessimizeNodeStartInfo ¶ added in v3.15.0
type DriverPessimizeNodeStartInfo 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 DriverRepeaterTickDoneInfo ¶ added in v3.15.0
type DriverRepeaterTickDoneInfo struct {
Error error
}
type DriverRepeaterTickStartInfo ¶ added in v3.15.0
type DriverRepeaterTickStartInfo 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 DriverResolveDoneInfo ¶ added in v3.15.0
type DriverResolveDoneInfo struct {
Error error
}
type DriverResolveStartInfo ¶ added in v3.15.0
type EndpointInfo ¶ added in v3.11.8
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 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 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(ScriptingExecuteStartInfo) func(ScriptingExecuteDoneInfo) OnStreamExecute func( ScriptingStreamExecuteStartInfo, ) func( ScriptingStreamExecuteIntermediateInfo, ) func( ScriptingStreamExecuteDoneInfo, ) OnExplain func(ScriptingExplainStartInfo) func(ScriptingExplainDoneInfo) OnClose func(ScriptingCloseStartInfo) func(ScriptingCloseDoneInfo) }
type ScriptingCloseDoneInfo ¶ added in v3.13.1
type ScriptingCloseDoneInfo struct {
Error error
}
type ScriptingCloseStartInfo ¶ added in v3.13.1
type ScriptingCloseStartInfo 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 ScriptingExecuteDoneInfo ¶ added in v3.13.1
type ScriptingExecuteDoneInfo struct { Result scriptingResult Error error }
type ScriptingExecuteStartInfo ¶ added in v3.13.1
type ScriptingExecuteStartInfo 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 Query string Parameters scriptingQueryParameters }
type ScriptingExplainDoneInfo ¶ added in v3.13.1
type ScriptingExplainStartInfo ¶ added in v3.13.1
type ScriptingExplainStartInfo 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 Query string }
type ScriptingStreamExecuteDoneInfo ¶ added in v3.13.1
type ScriptingStreamExecuteDoneInfo struct {
Error error
}
type ScriptingStreamExecuteIntermediateInfo ¶ added in v3.13.1
type ScriptingStreamExecuteIntermediateInfo struct {
Error error
}
type ScriptingStreamExecuteStartInfo ¶ added in v3.13.1
type ScriptingStreamExecuteStartInfo 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 Query string Parameters scriptingQueryParameters }
type Table ¶
type Table struct { // Client events OnInit func(TableInitStartInfo) func(TableInitDoneInfo) OnClose func(TableCloseStartInfo) func(TableCloseDoneInfo) OnDo func(TableDoStartInfo) func(info TableDoIntermediateInfo) func(TableDoDoneInfo) OnDoTx func(TableDoTxStartInfo) func(info TableDoTxIntermediateInfo) func(TableDoTxDoneInfo) OnCreateSession func( TableCreateSessionStartInfo, ) func( info TableCreateSessionIntermediateInfo, ) func( TableCreateSessionDoneInfo, ) // Session events OnSessionNew func(TableSessionNewStartInfo) func(TableSessionNewDoneInfo) OnSessionDelete func(TableSessionDeleteStartInfo) func(TableSessionDeleteDoneInfo) OnSessionKeepAlive func(TableKeepAliveStartInfo) func(TableKeepAliveDoneInfo) // Query events OnSessionQueryPrepare func(TablePrepareDataQueryStartInfo) func(TablePrepareDataQueryDoneInfo) OnSessionQueryExecute func(TableExecuteDataQueryStartInfo) func(TableExecuteDataQueryDoneInfo) OnSessionQueryExplain func(TableExplainQueryStartInfo) func(TableExplainQueryDoneInfo) // Stream events OnSessionQueryStreamExecute func( TableSessionQueryStreamExecuteStartInfo, ) func( TableSessionQueryStreamExecuteIntermediateInfo, ) func( TableSessionQueryStreamExecuteDoneInfo, ) OnSessionQueryStreamRead func( TableSessionQueryStreamReadStartInfo, ) func( TableSessionQueryStreamReadIntermediateInfo, ) func( TableSessionQueryStreamReadDoneInfo, ) // Transaction events OnSessionTransactionBegin func(TableSessionTransactionBeginStartInfo) func(TableSessionTransactionBeginDoneInfo) OnSessionTransactionCommit func( TableSessionTransactionCommitStartInfo, ) func( TableSessionTransactionCommitDoneInfo, ) OnSessionTransactionRollback func( TableSessionTransactionRollbackStartInfo, ) func( TableSessionTransactionRollbackDoneInfo, ) // Pool state event OnPoolStateChange func(TablePooStateChangeInfo) // Pool session lifecycle events OnPoolSessionNew func(TablePoolSessionNewStartInfo) func(TablePoolSessionNewDoneInfo) OnPoolSessionClose func(TablePoolSessionCloseStartInfo) func(TablePoolSessionCloseDoneInfo) // Pool common API events OnPoolPut func(TablePoolPutStartInfo) func(TablePoolPutDoneInfo) OnPoolGet func(TablePoolGetStartInfo) func(TablePoolGetDoneInfo) OnPoolWait func(TablePoolWaitStartInfo) func(TablePoolWaitDoneInfo) }
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 TableCloseDoneInfo ¶ added in v3.13.1
type TableCloseDoneInfo struct {
Error error
}
type TableCloseStartInfo ¶ added in v3.13.1
type TableCloseStartInfo 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 TableCreateSessionDoneInfo ¶ added in v3.15.0
type TableCreateSessionIntermediateInfo ¶ added in v3.15.0
type TableCreateSessionIntermediateInfo struct {
Error error
}
type TableCreateSessionStartInfo ¶ added in v3.15.0
type TableCreateSessionStartInfo 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 TableDoDoneInfo ¶ added in v3.15.0
type TableDoIntermediateInfo ¶ added in v3.15.0
type TableDoIntermediateInfo struct {
Error error
}
type TableDoStartInfo ¶ added in v3.15.0
type TableDoStartInfo 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 TableDoTxDoneInfo ¶ added in v3.15.0
type TableDoTxIntermediateInfo ¶ added in v3.15.0
type TableDoTxIntermediateInfo struct {
Error error
}
type TableDoTxStartInfo ¶ added in v3.15.0
type TableDoTxStartInfo 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 TableExecuteDataQueryDoneInfo ¶ added in v3.15.0
type TableExecuteDataQueryStartInfo ¶ added in v3.15.0
type TableExecuteDataQueryStartInfo 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 tableSessionInfo Query tableDataQuery Parameters tableQueryParameters }
type TableExplainQueryDoneInfo ¶ added in v3.15.0
type TableExplainQueryStartInfo ¶ added in v3.15.0
type TableExplainQueryStartInfo 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 tableSessionInfo Query string }
type TableInitDoneInfo ¶ added in v3.13.1
type TableInitStartInfo ¶ added in v3.13.1
type TableInitStartInfo 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 TableKeepAliveDoneInfo ¶ added in v3.15.0
type TableKeepAliveDoneInfo struct {
Error error
}
type TableKeepAliveStartInfo ¶ added in v3.15.0
type TableKeepAliveStartInfo 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 tableSessionInfo }
type TablePooStateChangeInfo ¶ added in v3.15.0
type TablePoolGetDoneInfo ¶ added in v3.15.0
type TablePoolGetStartInfo ¶ added in v3.15.0
type TablePoolGetStartInfo 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 TablePoolPutDoneInfo ¶ added in v3.15.0
type TablePoolPutDoneInfo struct {
Error error
}
type TablePoolPutStartInfo ¶ added in v3.15.0
type TablePoolPutStartInfo 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 tableSessionInfo }
type TablePoolSessionCloseDoneInfo ¶ added in v3.15.0
type TablePoolSessionCloseDoneInfo struct{}
type TablePoolSessionCloseStartInfo ¶ added in v3.15.0
type TablePoolSessionCloseStartInfo 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 tableSessionInfo }
type TablePoolSessionNewDoneInfo ¶ added in v3.15.0
type TablePoolSessionNewDoneInfo struct { Session tableSessionInfo Error error }
type TablePoolSessionNewStartInfo ¶ added in v3.15.0
type TablePoolSessionNewStartInfo 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 TablePoolWaitDoneInfo ¶ added in v3.15.0
type TablePoolWaitDoneInfo struct { Session tableSessionInfo Error error }
TablePoolWaitDoneInfo 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 tableResultErr
type TablePoolWaitStartInfo ¶ added in v3.15.0
type TablePoolWaitStartInfo 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 TablePrepareDataQueryDoneInfo ¶ added in v3.15.0
type TablePrepareDataQueryDoneInfo struct { Result tableDataQuery Error error }
type TablePrepareDataQueryStartInfo ¶ added in v3.15.0
type TablePrepareDataQueryStartInfo 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 tableSessionInfo Query string }
type TableSessionDeleteDoneInfo ¶ added in v3.15.0
type TableSessionDeleteDoneInfo struct {
Error error
}
type TableSessionDeleteStartInfo ¶ added in v3.15.0
type TableSessionDeleteStartInfo 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 tableSessionInfo }
type TableSessionNewDoneInfo ¶ added in v3.15.0
type TableSessionNewDoneInfo struct { Session tableSessionInfo Error error }
type TableSessionNewStartInfo ¶ added in v3.15.0
type TableSessionNewStartInfo 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 TableSessionQueryStreamExecuteDoneInfo ¶ added in v3.15.0
type TableSessionQueryStreamExecuteDoneInfo struct {
Error error
}
type TableSessionQueryStreamExecuteIntermediateInfo ¶ added in v3.15.0
type TableSessionQueryStreamExecuteIntermediateInfo struct {
Error error
}
type TableSessionQueryStreamExecuteStartInfo ¶ added in v3.15.0
type TableSessionQueryStreamExecuteStartInfo 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 tableSessionInfo Query tableDataQuery Parameters tableQueryParameters }
type TableSessionQueryStreamReadDoneInfo ¶ added in v3.15.0
type TableSessionQueryStreamReadDoneInfo struct {
Error error
}
type TableSessionQueryStreamReadIntermediateInfo ¶ added in v3.15.0
type TableSessionQueryStreamReadIntermediateInfo struct {
Error error
}
type TableSessionQueryStreamReadStartInfo ¶ added in v3.15.0
type TableSessionQueryStreamReadStartInfo 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 tableSessionInfo }
type TableSessionTransactionBeginDoneInfo ¶ added in v3.15.0
type TableSessionTransactionBeginDoneInfo struct { Tx tableTransactionInfo Error error }
type TableSessionTransactionBeginStartInfo ¶ added in v3.15.0
type TableSessionTransactionBeginStartInfo 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 tableSessionInfo }
type TableSessionTransactionCommitDoneInfo ¶ added in v3.15.0
type TableSessionTransactionCommitDoneInfo struct {
Error error
}
type TableSessionTransactionCommitStartInfo ¶ added in v3.15.0
type TableSessionTransactionCommitStartInfo 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 tableSessionInfo Tx tableTransactionInfo }
type TableSessionTransactionRollbackDoneInfo ¶ added in v3.15.0
type TableSessionTransactionRollbackDoneInfo struct {
Error error
}
type TableSessionTransactionRollbackStartInfo ¶ added in v3.15.0
type TableSessionTransactionRollbackStartInfo 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 tableSessionInfo Tx tableTransactionInfo }