Documentation ¶
Index ¶
- type ProviderCache
- type ProviderCaches
- type ProviderService
- func (service *ProviderService) CacheProvider(ctx context.Context, provider *models.Provider)
- func (service *ProviderService) GetProviderCache(provider *models.Provider) *ProviderCache
- func (service *ProviderService) RunCacheWorker(ctx context.Context) error
- func (service *ProviderService) WaitForCacheReady()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProviderCache ¶
type ProviderCache struct { *ProviderService *models.Provider // contains filtered or unexported fields }
func (*ProviderCache) ArchiveFilename ¶
func (cache *ProviderCache) ArchiveFilename() string
type ProviderCaches ¶
type ProviderCaches []*ProviderCache
func (ProviderCaches) Find ¶
func (providers ProviderCaches) Find(target *models.Provider) *ProviderCache
type ProviderService ¶
type ProviderService struct {
// contains filtered or unexported fields
}
func NewProviderService ¶
func NewProviderService(baseCacheDir, baseArchiveDir, baseUserProviderDir string, needCacheArchives bool) *ProviderService
func (*ProviderService) CacheProvider ¶
func (service *ProviderService) CacheProvider(ctx context.Context, provider *models.Provider)
CacheProvider starts caching the given provider using non-blocking approach.
func (*ProviderService) GetProviderCache ¶
func (service *ProviderService) GetProviderCache(provider *models.Provider) *ProviderCache
GetProviderCache returns the requested provider archive cache, if it exists.
func (*ProviderService) RunCacheWorker ¶
func (service *ProviderService) RunCacheWorker(ctx context.Context) error
RunCacheWorker is responsible to handle a new caching request and removing temporary files upon completion.
func (*ProviderService) WaitForCacheReady ¶
func (service *ProviderService) WaitForCacheReady()
WaitForCacheReady blocks the call until all providers are cached.
Click to show internal directories.
Click to hide internal directories.