Documentation ¶
Index ¶
- Variables
- func Contains(sl []string, str string) bool
- func CreateFarmID(farmName string)
- func DecodeJSON(encodedJSON types.JSONnftlb) string
- func DecodePrettyJSON(encodedJSON types.JSONnftlb) string
- func DecreaseBackendID(farmName string)
- func EncodeJSON(stringJSON string) types.JSONnftlb
- func GetBackendID(farmName string) int
- func GetJSONnftlbFromEndpoints(endpoints *v1.Endpoints) types.JSONnftlb
- func GetJSONnftlbFromService(service *v1.Service) types.JSONnftlb
- func IncreaseBackendID(farmName string)
Constants ¶
This section is empty.
Variables ¶
var ( ID = struct { sync.RWMutex farms map[string]int }{/* contains filtered or unexported fields */} )
ID is a hash table for backends, corresponding to [farm-name]backend-number.
Functions ¶
func DecodeJSON ¶
DecodeJSON decodes any encoded JSONnftlb object and returns a JSON string; the JSON string being returned is NOT indented.
func DecodePrettyJSON ¶
DecodePrettyJSON decodes any encoded JSONnftlb object and returns a JSON string; the JSON string being returned is indented.
func DecreaseBackendID ¶
func DecreaseBackendID(farmName string)
DecreaseBackendID decreases the backend ID given the farm name.
func EncodeJSON ¶
EncodeJSON returns a JSONnftlb struct with its fields filled with the JSON data.
func GetBackendID ¶
GetBackendID returns the backend ID given the farm name.
func GetJSONnftlbFromEndpoints ¶
GetJSONnftlbFromEndpoints returns a JSONnftlb struct filled with any Endpoints data.
func GetJSONnftlbFromService ¶
GetJSONnftlbFromService returns a JSONnftlb struct filled with any Service data.
func IncreaseBackendID ¶
func IncreaseBackendID(farmName string)
IncreaseBackendID increases the backend ID given the farm name.
Types ¶
This section is empty.