services

package
v0.57.9 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 20 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 {
	*models.Provider
	// contains filtered or unexported fields
}

func (*ProviderCache) ArchivePath added in v0.57.9

func (cache *ProviderCache) ArchivePath() string

func (*ProviderCache) AuthenticatePackage added in v0.57.9

func (cache *ProviderCache) AuthenticatePackage(ctx context.Context) (*provider.PackageAuthenticationResult, error)

type ProviderCaches

type ProviderCaches []*ProviderCache

func (ProviderCaches) Find

func (caches ProviderCaches) Find(target *models.Provider) *ProviderCache

func (ProviderCaches) FindByRequestID added in v0.57.9

func (caches ProviderCaches) FindByRequestID(requestID string) ProviderCaches

type ProviderService

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

func NewProviderService

func NewProviderService(baseCacheDir, baseArchiveDir, baseUserCacheDir string) *ProviderService

func (*ProviderService) CacheProvider

func (service *ProviderService) CacheProvider(ctx context.Context, requestID string, provider *models.Provider) *ProviderCache

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 requestID and removing temporary files upon completion.

func (*ProviderService) WaitForCacheReady

func (service *ProviderService) WaitForCacheReady(requestID string) ProviderCaches

WaitForCacheReady returns cached providers that were requested by `terraform init` from the cache server, with an URL containing the given `requestID` value. The function returns the value only when all cache requests have been processed.

Jump to

Keyboard shortcuts

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