data_manager

package
v0.0.0-...-2b29b9b Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

View Source
const (
	CANDIDATE_MANAGER_IMPL_HOST      = "host"
	CANDIDATE_MANAGER_IMPL_BAREMETAL = "baremetal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaremetalCandidateManagerImplProvider

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

func (*BaremetalCandidateManagerImplProvider) GetCandidate

func (p *BaremetalCandidateManagerImplProvider) GetCandidate(id string) (interface{}, error)

func (*BaremetalCandidateManagerImplProvider) LoadCandidates

func (p *BaremetalCandidateManagerImplProvider) LoadCandidates() ([]interface{}, error)

func (*BaremetalCandidateManagerImplProvider) ReloadAllCandidates

func (p *BaremetalCandidateManagerImplProvider) ReloadAllCandidates() ([]interface{}, error)

func (*BaremetalCandidateManagerImplProvider) ReloadCandidates

func (p *BaremetalCandidateManagerImplProvider) ReloadCandidates(
	ids []string) ([]interface{}, error)

type CandidateGetArgs

type CandidateGetArgs struct {
	// ResType is candidate host_type
	ResType   string
	RegionID  string
	ZoneID    string
	ManagerID string
	HostTypes []string
}

type CandidateManager

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

func NewCandidateManager

func NewCandidateManager(dataManager *DataManager, stopCh <-chan struct{}) *CandidateManager

func (*CandidateManager) AddImpl

func (cm *CandidateManager) AddImpl(name string, impl *CandidateManagerImpl)

func (*CandidateManager) GetCandidate

func (cm *CandidateManager) GetCandidate(id string, resType string) (interface{}, error)

func (*CandidateManager) GetCandidates

func (cm *CandidateManager) GetCandidates(args CandidateGetArgs) ([]core.Candidater, error)

func (*CandidateManager) GetCandidatesByIds

func (cm *CandidateManager) GetCandidatesByIds(resType string, ids []string) ([]core.Candidater, error)

func (*CandidateManager) Reload

func (cm *CandidateManager) Reload(resType string, candidateIds []string) ([]interface{}, error)

func (*CandidateManager) ReloadAll

func (cm *CandidateManager) ReloadAll(resType string) ([]interface{}, error)

func (*CandidateManager) ReloadHosts

func (cm *CandidateManager) ReloadHosts(ids []string) ([]interface{}, error)

func (*CandidateManager) Run

func (cm *CandidateManager) Run()

type CandidateManagerImpl

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

func NewCandidateManagerImpl

func NewCandidateManagerImpl(provider CandidateManagerImplProvider, stopCh <-chan struct{},
) *CandidateManagerImpl

func (*CandidateManagerImpl) GetCandidate

func (impl *CandidateManagerImpl) GetCandidate(id string) (interface{}, error)

func (*CandidateManagerImpl) GetCandidates

func (impl *CandidateManagerImpl) GetCandidates() ([]interface{}, error)

func (*CandidateManagerImpl) Reload

func (impl *CandidateManagerImpl) Reload(ids []string) ([]interface{}, error)

func (*CandidateManagerImpl) ReloadAll

func (impl *CandidateManagerImpl) ReloadAll() ([]interface{}, error)

func (*CandidateManagerImpl) Run

func (impl *CandidateManagerImpl) Run()

type CandidateManagerImplProvider

type CandidateManagerImplProvider interface {
	LoadCandidates() ([]interface{}, error)
	ReloadCandidates(ids []string) ([]interface{}, error)
	ReloadAllCandidates() ([]interface{}, error)
	GetCandidate(id string) (interface{}, error)
}

type DataManager

type DataManager struct {
	SyncCacheGroup cache.CacheGroup
	CandidateGroup cache.CacheGroup
}

func NewDataManager

func NewDataManager(stopCh <-chan struct{}) *DataManager

func (*DataManager) Run

func (m *DataManager) Run()

type HostCandidateManagerImplProvider

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

func (*HostCandidateManagerImplProvider) GetCandidate

func (p *HostCandidateManagerImplProvider) GetCandidate(id string) (interface{}, error)

func (*HostCandidateManagerImplProvider) LoadCandidates

func (p *HostCandidateManagerImplProvider) LoadCandidates() ([]interface{}, error)

func (*HostCandidateManagerImplProvider) ReloadAllCandidates

func (p *HostCandidateManagerImplProvider) ReloadAllCandidates() ([]interface{}, error)

func (*HostCandidateManagerImplProvider) ReloadCandidates

func (p *HostCandidateManagerImplProvider) ReloadCandidates(
	ids []string) ([]interface{}, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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