cache

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GatewayLookupCache

type GatewayLookupCache struct {
	// contains filtered or unexported fields
}

GatewayLookupCache provides concurrency safe lookups from dns host to namespace/gateway Use New() as the Add, Delete, and Get functions all assume the cache map is non-nil

func New

func New() *GatewayLookupCache

func (*GatewayLookupCache) Add

func (glc *GatewayLookupCache) Add(gateway string, hosts ...string)

func (*GatewayLookupCache) AddFunc

func (glc *GatewayLookupCache) AddFunc(obj interface{})

func (*GatewayLookupCache) Delete

func (glc *GatewayLookupCache) Delete(hosts ...string)

func (*GatewayLookupCache) DeleteFunc

func (glc *GatewayLookupCache) DeleteFunc(obj interface{})

func (*GatewayLookupCache) Get

func (glc *GatewayLookupCache) Get(host string) (string, bool)

func (*GatewayLookupCache) UpdateFunc

func (glc *GatewayLookupCache) UpdateFunc(oldObj, newObj interface{})

Jump to

Keyboard shortcuts

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