gsel_builder.go 636 B

1234567891011121314151617181920
  1. // Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
  2. //
  3. // This Source Code Form is subject to the terms of the MIT License.
  4. // If a copy of the MIT was not distributed with this file,
  5. // You can obtain one at https://github.com/gogf/gf.
  6. package gsel
  7. // defaultBuilder is the default Builder for globally used purpose.
  8. var defaultBuilder = NewBuilderRoundRobin()
  9. // SetBuilder sets the default builder for globally used purpose.
  10. func SetBuilder(builder Builder) {
  11. defaultBuilder = builder
  12. }
  13. // GetBuilder returns the default builder for globally used purpose.
  14. func GetBuilder() Builder {
  15. return defaultBuilder
  16. }