cache

package
v0.36.4 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	configuration librepo.Configuration,
	customConfig config.CustomConfiguration,
	logging librepo.Logging,
	timestamp librepo.Timestamp,
) repository.Cache

Types

type Impl

type Impl struct {
	Configuration       librepo.Configuration
	CustomConfiguration config.CustomConfiguration
	Logging             librepo.Logging
	Timestamp           librepo.Timestamp

	OwnerCache      libcache.Cache[openapi.OwnerDto]
	ServiceCache    libcache.Cache[openapi.ServiceDto]
	RepositoryCache libcache.Cache[openapi.RepositoryDto]
	TimestampCache  libcache.Cache[string]
}

func (*Impl) DeleteOwner

func (s *Impl) DeleteOwner(ctx context.Context, alias string) error

func (*Impl) DeleteRepository

func (s *Impl) DeleteRepository(ctx context.Context, key string) error

func (*Impl) DeleteService

func (s *Impl) DeleteService(ctx context.Context, name string) error

func (*Impl) GetOwner

func (s *Impl) GetOwner(ctx context.Context, alias string) (openapi.OwnerDto, error)

func (*Impl) GetOwnerListTimestamp

func (s *Impl) GetOwnerListTimestamp(ctx context.Context) (string, error)

func (*Impl) GetRepository

func (s *Impl) GetRepository(ctx context.Context, key string) (openapi.RepositoryDto, error)

func (*Impl) GetRepositoryListTimestamp

func (s *Impl) GetRepositoryListTimestamp(ctx context.Context) (string, error)

func (*Impl) GetService

func (s *Impl) GetService(ctx context.Context, name string) (openapi.ServiceDto, error)

func (*Impl) GetServiceListTimestamp

func (s *Impl) GetServiceListTimestamp(ctx context.Context) (string, error)

func (*Impl) GetSortedOwnerAliases

func (s *Impl) GetSortedOwnerAliases(ctx context.Context) ([]string, error)

func (*Impl) GetSortedRepositoryKeys

func (s *Impl) GetSortedRepositoryKeys(ctx context.Context) ([]string, error)

func (*Impl) GetSortedServiceNames

func (s *Impl) GetSortedServiceNames(ctx context.Context) ([]string, error)

func (*Impl) IsCache

func (s *Impl) IsCache() bool

func (*Impl) PutOwner

func (s *Impl) PutOwner(ctx context.Context, alias string, entry openapi.OwnerDto) error

func (*Impl) PutRepository

func (s *Impl) PutRepository(ctx context.Context, key string, entry openapi.RepositoryDto) error

func (*Impl) PutService

func (s *Impl) PutService(ctx context.Context, name string, entry openapi.ServiceDto) error

func (*Impl) SetOwnerListTimestamp

func (s *Impl) SetOwnerListTimestamp(ctx context.Context, timestamp string) error

func (*Impl) SetRepositoryListTimestamp

func (s *Impl) SetRepositoryListTimestamp(ctx context.Context, timestamp string) error

func (*Impl) SetServiceListTimestamp

func (s *Impl) SetServiceListTimestamp(ctx context.Context, timestamp string) error

func (*Impl) Setup

func (s *Impl) Setup() error

func (*Impl) SetupCache

func (s *Impl) SetupCache(ctx context.Context) error

Jump to

Keyboard shortcuts

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