MCPcopy Create free account
hub / github.com/DoNewsCode/core / WithConfigInterceptor

Function WithConfigInterceptor

otgorm/dependency_option.go:21–25  ·  view source on GitHub ↗

WithConfigInterceptor instructs the Providers to accept the GormConfigInterceptor so that users can change config during runtime. This can be useful when some dynamic computations on configs are required.

(interceptor GormConfigInterceptor)

Source from the content-addressed store, hash-verified

19// GormConfigInterceptor so that users can change config during runtime. This can
20// be useful when some dynamic computations on configs are required.
21func WithConfigInterceptor(interceptor GormConfigInterceptor) ProvidersOptionFunc {
22 return func(options *providersOption) {
23 options.interceptor = interceptor
24 }
25}
26
27// WithDrivers instructs the Providers to add new drivers or replace existing
28// drivers. (By default, only "mysql", "sqlite", and "clickhouse" drivers are

Callers 1

TestProvidersFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestProvidersFunction · 0.56