cache

package
v1.0.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadDomainInterfaceCache added in v0.50.0

func ReadDomainInterfaceCache(c cacheCreator, pid, ifaceName string) (*api.Interface, error)

func WriteDHCPInterfaceCache added in v0.50.0

func WriteDHCPInterfaceCache(c cacheCreator, pid, ifaceName string, dhcpConfig *DHCPConfig) error

func WriteDomainInterfaceCache added in v0.50.0

func WriteDomainInterfaceCache(c cacheCreator, pid, ifaceName string, domainInterface *api.Interface) error

func WritePodInterfaceCache added in v0.50.0

func WritePodInterfaceCache(c cacheCreator, uid, ifaceName string, cacheInterface *PodIfaceCacheData) error

Types

type Cache added in v0.50.0

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

func NewCustomCache added in v0.50.0

func NewCustomCache(path string, fs cacheFS) *Cache

func (Cache) Delete added in v0.50.0

func (c Cache) Delete() error

func (Cache) Entry added in v0.50.0

func (c Cache) Entry(path string) (Cache, error)

func (Cache) Read added in v0.50.0

func (c Cache) Read(data interface{}) (interface{}, error)

func (Cache) Write added in v0.50.0

func (c Cache) Write(data interface{}) error

type CacheCreator added in v0.50.0

type CacheCreator struct{}

func (CacheCreator) New added in v0.50.0

func (_ CacheCreator) New(filePath string) *Cache

type DHCPConfig added in v0.43.0

type DHCPConfig struct {
	Name                string
	IP                  netlink.Addr
	IPv6                netlink.Addr
	MAC                 net.HardwareAddr
	AdvertisingIPAddr   net.IP
	AdvertisingIPv6Addr net.IP
	Routes              *[]netlink.Route
	Mtu                 uint16
	IPAMDisabled        bool
	Gateway             net.IP
	Subdomain           string
}

func ReadDHCPInterfaceCache added in v0.50.0

func ReadDHCPInterfaceCache(c cacheCreator, pid, ifaceName string) (*DHCPConfig, error)

func (DHCPConfig) String added in v0.43.0

func (d DHCPConfig) String() string

type DHCPInterfaceCache added in v0.50.0

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

func NewDHCPInterfaceCache added in v0.50.0

func NewDHCPInterfaceCache(creator cacheCreator, pid string) DHCPInterfaceCache

func (DHCPInterfaceCache) IfaceEntry added in v0.50.0

func (d DHCPInterfaceCache) IfaceEntry(ifaceName string) (DHCPInterfaceCache, error)

func (DHCPInterfaceCache) Read added in v0.50.0

func (d DHCPInterfaceCache) Read() (*DHCPConfig, error)

func (DHCPInterfaceCache) Write added in v0.50.0

func (d DHCPInterfaceCache) Write(dhcpConfig *DHCPConfig) error

type DomainInterfaceCache added in v0.50.0

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

func NewDomainInterfaceCache added in v0.50.0

func NewDomainInterfaceCache(creator cacheCreator, pid string) DomainInterfaceCache

func (DomainInterfaceCache) IfaceEntry added in v0.50.0

func (d DomainInterfaceCache) IfaceEntry(ifaceName string) (DomainInterfaceCache, error)

func (DomainInterfaceCache) Read added in v0.50.0

func (d DomainInterfaceCache) Read() (*api.Interface, error)

func (DomainInterfaceCache) Write added in v0.50.0

func (d DomainInterfaceCache) Write(domainInterface *api.Interface) error

type PodIfaceCacheData added in v0.50.0

type PodIfaceCacheData struct {
	Iface  *v1.Interface `json:"iface,omitempty"`
	PodIP  string        `json:"podIP,omitempty"`
	PodIPs []string      `json:"podIPs,omitempty"`
	State  PodIfaceState `json:"networkState,omitempty"`
}

func ReadPodInterfaceCache added in v0.50.0

func ReadPodInterfaceCache(c cacheCreator, uid, ifaceName string) (*PodIfaceCacheData, error)

type PodIfaceState added in v0.44.1

type PodIfaceState int
const (
	PodIfaceNetworkPreparationPending PodIfaceState = iota
	PodIfaceNetworkPreparationStarted
	PodIfaceNetworkPreparationFinished
)

type PodInterfaceCache added in v0.50.0

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

func NewPodInterfaceCache added in v0.50.0

func NewPodInterfaceCache(creator cacheCreator, uid string) PodInterfaceCache

func (PodInterfaceCache) IfaceEntry added in v0.50.0

func (p PodInterfaceCache) IfaceEntry(ifaceName string) (PodInterfaceCache, error)

func (PodInterfaceCache) Read added in v0.50.0

func (PodInterfaceCache) Remove added in v0.50.0

func (p PodInterfaceCache) Remove() error

func (PodInterfaceCache) Write added in v0.50.0

func (p PodInterfaceCache) Write(cacheInterface *PodIfaceCacheData) error

Jump to

Keyboard shortcuts

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