refresh

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock interface {
	Now() time.Time
}

type ProviderLister

type ProviderLister interface {
	List(ctx context.Context) ([]provider.Provider, error)
}

type RefreshFunc

type RefreshFunc func(ctx context.Context, providerID int64) error

type Scheduler

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

func NewScheduler

func NewScheduler(repo ProviderLister, refresh RefreshFunc, interval time.Duration) *Scheduler

func (*Scheduler) RunOnce

func (s *Scheduler) RunOnce(ctx context.Context)

func (*Scheduler) Start

func (s *Scheduler) Start(ctx context.Context)

func (*Scheduler) WithClock

func (s *Scheduler) WithClock(c Clock) *Scheduler

func (*Scheduler) WithLogger

func (s *Scheduler) WithLogger(l *log.Logger) *Scheduler

type Service

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

func NewService

func NewService(providers *provider.Repository, fetcher *fetch.Client) *Service

func (*Service) RefreshProvider

func (s *Service) RefreshProvider(ctx context.Context, providerID int64) error

Jump to

Keyboard shortcuts

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