json

package
v0.0.0-...-ee29da7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 Contains

func Contains(sl []string, str string) bool

Contains returns true when "str" string is in "sl" slice.

func CreateFarmID

func CreateFarmID(farmName string)

CreateFarmID initializes the key-value pair.

func DecodeJSON

func DecodeJSON(encodedJSON types.JSONnftlb) string

DecodeJSON decodes any encoded JSONnftlb object and returns a JSON string; the JSON string being returned is NOT indented.

func DecodePrettyJSON

func DecodePrettyJSON(encodedJSON types.JSONnftlb) string

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

func EncodeJSON(stringJSON string) types.JSONnftlb

EncodeJSON returns a JSONnftlb struct with its fields filled with the JSON data.

func GetBackendID

func GetBackendID(farmName string) int

GetBackendID returns the backend ID given the farm name.

func GetJSONnftlbFromEndpoints

func GetJSONnftlbFromEndpoints(endpoints *v1.Endpoints) types.JSONnftlb

GetJSONnftlbFromEndpoints returns a JSONnftlb struct filled with any Endpoints data.

func GetJSONnftlbFromService

func GetJSONnftlbFromService(service *v1.Service) types.JSONnftlb

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL