github.com/mailru/activerecord@v1.12.2/pkg/activerecord/pinger.go (about) 1 package activerecord 2 3 import ( 4 "context" 5 ) 6 7 type ClusterConfigParameters struct { 8 Globs MapGlobParam 9 OptionCreator func(ShardInstanceConfig) (OptionInterface, error) 10 OptionChecker func(ctx context.Context, instance ShardInstance) (OptionInterface, error) 11 } 12 13 func (c ClusterConfigParameters) Validate() bool { 14 return c.OptionCreator != nil && c.OptionChecker != nil && c.Globs.PoolSize > 0 15 }