Documentation
¶
Overview ¶
Package cachetypes contains type definitions for caches in Porch.
Index ¶
Constants ¶
View Source
const DefaultDBCacheDriver string = "pgx"
Variables ¶
This section is empty.
Functions ¶
func IsACacheType ¶
Types ¶
type Cache ¶
type Cache interface {
OpenRepository(ctx context.Context, repositorySpec *configapi.Repository) (repository.Repository, error)
CloseRepository(ctx context.Context, repositorySpec *configapi.Repository, allRepos []configapi.Repository) error
GetRepositories() []*configapi.Repository
GetRepository(repository.RepositoryKey) repository.Repository
UpdateRepository(ctx context.Context, repositorySpec *configapi.Repository) error
CheckRepositoryConnectivity(ctx context.Context, repositorySpec *configapi.Repository) error
}
var (
CacheInstance Cache
)
type CacheFactory ¶
type CacheFactory interface {
NewCache(ctx context.Context, options CacheOptions) (Cache, error)
}
type CacheOptions ¶
type CacheOptions struct {
ExternalRepoOptions externalrepotypes.ExternalRepoOptions
RepoSyncFrequency time.Duration
RepoOperationRetryAttempts int
RepoPRChangeNotifier RepoPRChangeNotifier
CoreClient client.WithWatch
CacheType CacheType
DBCacheOptions DBCacheOptions
}
type CacheType ¶
type CacheType string
const ( CRCacheType CacheType = "CR" DBCacheType CacheType = "DB" DefaultCacheType CacheType = CRCacheType )
type DBCacheOptions ¶
type RepoPRChangeNotifier ¶
type RepoPRChangeNotifier interface {
NotifyPackageRevisionChange(eventType watch.EventType, obj repository.PackageRevision) int
}
Click to show internal directories.
Click to hide internal directories.