github.com/gogf/gf/v2@v2.7.4/net/gsel/gsel_builder.go (about)

     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  
     7  package gsel
     8  
     9  // defaultBuilder is the default Builder for globally used purpose.
    10  var defaultBuilder = NewBuilderRoundRobin()
    11  
    12  // SetBuilder sets the default builder for globally used purpose.
    13  func SetBuilder(builder Builder) {
    14  	defaultBuilder = builder
    15  }
    16  
    17  // GetBuilder returns the default builder for globally used purpose.
    18  func GetBuilder() Builder {
    19  	return defaultBuilder
    20  }