kube

package
v0.0.0-...-b3c4cc5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoggerCache = logrus.WithFields(logrus.Fields{"component": "cache"})
View Source
var LoggerStore = logrus.WithFields(logrus.Fields{"component": "store/kube"})

Functions

This section is empty.

Types

type Cache

type Cache struct {
	*sync.RWMutex
	// contains filtered or unexported fields
}

func NewCache

func NewCache() *Cache

func (*Cache) GetLastReservedIP

func (c *Cache) GetLastReservedIP(networkName string) *types.LastReservedIP

func (*Cache) GetNetwork

func (c *Cache) GetNetwork(networkName string) *types.Network

func (*Cache) IsIPUsing

func (c *Cache) IsIPUsing(ip string) bool

type Store

type Store struct {
	*sync.RWMutex
	// contains filtered or unexported fields
}

func NewStore

func NewStore(masterURL, kubeConfig string, stopCh <-chan struct{}) (*Store, error)

func (*Store) AddPool

func (s *Store) AddPool(name string, pool *types.Pool) error

func (*Store) CountPool

func (*Store) CountPool(network, pool string) (total, used int, err error)

func (*Store) CreateNetwork

func (s *Store) CreateNetwork(name string) error

func (*Store) DelPool

func (s *Store) DelPool(networkName, poolName string) error

func (*Store) DeleteNetwork

func (s *Store) DeleteNetwork(name string) error

func (*Store) GetLastReservedIP

func (s *Store) GetLastReservedIP(name string) (*types.LastReservedIP, error)

func (*Store) GetNetwork

func (s *Store) GetNetwork(name string) (*types.Network, error)

func (*Store) Release

func (s *Store) Release(ip net.IP) error

func (*Store) ReleaseByName

func (*Store) ReleaseByName(network, pool, namespace, name string) error

func (*Store) Reserve

func (s *Store) Reserve(network, pool, namespace, name string, ip net.IP) (bool, error)

func (*Store) Run

func (s *Store) Run() error

Jump to

Keyboard shortcuts

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