services

package
v0.56.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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