cache

package
v0.0.0-...-c7431a4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterUuid

func GetClusterUuid(client *clients.AviClient) (string, error)

func GetGSFromHmName

func GetGSFromHmName(hmName string) (string, int8, error)

this function returns - gsname, gen, error gen = 1 if the HM name is encoded and the gsname is fetched from its description gen = 2 if the HM name follows the old non encoded naming convention and gsname is fetched from hmname gen = 0 for error

func GetGSNameFromHmName

func GetGSNameFromHmName(hmName string) (string, error)

func GetGslbLeaderUuid

func GetGslbLeaderUuid(client *clients.AviClient) (string, error)

func GetHMFromName

func GetHMFromName(name string, gdp bool) (*models.HealthMonitor, error)

func GetHmDescriptionFromName

func GetHmDescriptionFromName(hmName string) string

As name is encoded, retreiving information about the Hm becomes difficult Thats why we fetch Hm description for further processing

func IsAviSiteLeader

func IsAviSiteLeader() (bool, error)

func ParsePoolAlgorithmSettings

func ParsePoolAlgorithmSettings(algorithm *string, fallbackAlgorithm *string, consistentHashMask *uint32) *gslbalphav1.PoolAlgorithmSettings

func ParsePoolAlgorithmSettingsFromPool

func ParsePoolAlgorithmSettingsFromPool(gsPool models.GslbPool) *gslbalphav1.PoolAlgorithmSettings

func ParsePoolAlgorithmSettingsFromPoolRaw

func ParsePoolAlgorithmSettingsFromPoolRaw(group map[string]interface{}) *gslbalphav1.PoolAlgorithmSettings

Parse the algorithm, fallback algorithm and consistent hash mask from the GS Group.

func SetTenantAndVersion

func SetTenantAndVersion(client *clients.AviClient, version string)

func SharedAviClients

func SharedAviClients() *utils.AviRestClientPool

SharedAviClients initializes a pool of connections to the avi controller

func VerifyVersion

func VerifyVersion() error

Types

type AviCache

type AviCache struct {
	Cache map[interface{}]interface{}
	// contains filtered or unexported fields
}

func GetAviCache

func GetAviCache() *AviCache

func PopulateGSCache

func PopulateGSCache(createSharedCache bool) *AviCache

func (*AviCache) AviCacheAdd

func (c *AviCache) AviCacheAdd(k interface{}, val interface{})

func (*AviCache) AviCacheDelete

func (c *AviCache) AviCacheDelete(k interface{})

func (*AviCache) AviCacheGet

func (c *AviCache) AviCacheGet(k interface{}) (interface{}, bool)

func (*AviCache) AviCacheGetAllKeys

func (c *AviCache) AviCacheGetAllKeys() []TenantName

func (*AviCache) AviCacheGetByUuid

func (c *AviCache) AviCacheGetByUuid(uuid string) (interface{}, bool)

func (*AviCache) AviObjCachePopulate

func (c *AviCache) AviObjCachePopulate(client *clients.AviClient,
	version string)

func (*AviCache) AviObjGSCachePopulate

func (c *AviCache) AviObjGSCachePopulate(client *clients.AviClient, gsname ...string)

type AviGSCache

type AviGSCache struct {
	Name             string
	Tenant           string
	Uuid             string
	Members          []GSMember
	K8sObjects       []string
	HealthMonitor    []string
	GSDownResponse   *gslbalphav1.DownResponse
	CloudConfigCksum uint32
	CreatedBy        string
}

type AviHmCache

type AviHmCache struct {
	Cache     map[interface{}]interface{}
	UUIDCache map[string]interface{}
	// contains filtered or unexported fields
}

func GetAviHmCache

func GetAviHmCache() *AviHmCache

func PopulateHMCache

func PopulateHMCache(createSharedCache bool) *AviHmCache

func (*AviHmCache) AviHmCacheAdd

func (h *AviHmCache) AviHmCacheAdd(k interface{}, val *AviHmObj)

func (*AviHmCache) AviHmCacheDelete

func (h *AviHmCache) AviHmCacheDelete(k interface{})

func (*AviHmCache) AviHmCacheGet

func (h *AviHmCache) AviHmCacheGet(k interface{}) (interface{}, bool)

func (*AviHmCache) AviHmCacheGetByUUID

func (h *AviHmCache) AviHmCacheGetByUUID(k string) (interface{}, bool)

func (*AviHmCache) AviHmCacheGetHmsForGS

func (h *AviHmCache) AviHmCacheGetHmsForGS(tenant, gsName string) []interface{}

func (*AviHmCache) AviHmCachePopulate

func (h *AviHmCache) AviHmCachePopulate(client *clients.AviClient,
	version string)

func (*AviHmCache) AviHmGetAllKeys

func (h *AviHmCache) AviHmGetAllKeys() []interface{}

func (*AviHmCache) AviHmObjCachePopulate

func (h *AviHmCache) AviHmObjCachePopulate(client *clients.AviClient, hmname ...string) error

type AviHmObj

type AviHmObj struct {
	Tenant           string
	Name             string
	Port             int32
	UUID             string
	Type             string
	CloudConfigCksum uint32
	Template         *string
	CustomHmSettings *CustomHmSettings
	Description      string
	CreatedBy        string
}

type AviPkiCache

type AviPkiCache struct {
	Cache     map[interface{}]interface{}
	UUIDCache map[string]interface{}
	// contains filtered or unexported fields
}

func GetAviPkiCache

func GetAviPkiCache() *AviPkiCache

func PopulatePkiCache

func PopulatePkiCache() *AviPkiCache

func (*AviPkiCache) AviPkiCacheAdd

func (s *AviPkiCache) AviPkiCacheAdd(k interface{}, val interface{})

func (*AviPkiCache) AviPkiCacheAddByUUID

func (s *AviPkiCache) AviPkiCacheAddByUUID(uuid string, val interface{})

func (*AviPkiCache) AviPkiCacheGet

func (s *AviPkiCache) AviPkiCacheGet(k interface{}) (interface{}, bool)

func (*AviPkiCache) AviPkiCacheGetByUUID

func (s *AviPkiCache) AviPkiCacheGetByUUID(uuid string) (interface{}, bool)

func (*AviPkiCache) AviPkiCachePopulate

func (s *AviPkiCache) AviPkiCachePopulate(client *clients.AviClient) error

type AviSpCache

type AviSpCache struct {
	Cache     map[interface{}]interface{}
	UUIDCache map[string]interface{}
	// contains filtered or unexported fields
}

func GetAviSpCache

func GetAviSpCache() *AviSpCache

func PopulateSPCache

func PopulateSPCache() *AviSpCache

func (*AviSpCache) AviSitePersistenceCachePopulate

func (s *AviSpCache) AviSitePersistenceCachePopulate(client *clients.AviClient) error

func (*AviSpCache) AviSpCacheAdd

func (s *AviSpCache) AviSpCacheAdd(k interface{}, val interface{})

func (*AviSpCache) AviSpCacheAddByUUID

func (s *AviSpCache) AviSpCacheAddByUUID(uuid string, val interface{})

func (*AviSpCache) AviSpCacheGet

func (s *AviSpCache) AviSpCacheGet(k interface{}) (interface{}, bool)

func (*AviSpCache) AviSpCacheGetByUUID

func (s *AviSpCache) AviSpCacheGetByUUID(uuid string) (interface{}, bool)

type CustomHmSettings

type CustomHmSettings struct {
	RequestHeader string
	ResponseCode  []string
}

type GSMember

type GSMember struct {
	IPAddr     string
	Weight     uint32
	Priority   uint32
	VsUUID     string
	Controller string
	PublicIP   string
}

func GetDetailsFromAviGSLB

func GetDetailsFromAviGSLB(gslbSvcMap map[string]interface{}) (uint32, []GSMember, []string, []string, *gslbalphav1.DownResponse, string, error)

func GetDetailsFromAviGSLBFormatted

func GetDetailsFromAviGSLBFormatted(gsObj models.GslbService) (uint32, []GSMember, []string, []string, *gslbalphav1.DownResponse, string, error)

type TenantName

type TenantName struct {
	Tenant string
	Name   string
}

Jump to

Keyboard shortcuts

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