devicesync

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const RefreshInterval = 5 * time.Minute

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectoryStore

type DirectoryStore interface {
	ApplyDirectorySnapshotAt(
		context.Context,
		domain.DirectorySnapshot,
		domain.DirectorySyncState,
		time.Time,
	) (aggregate.DirectoryApplyResult, error)
	UpdateDirectorySyncStateAt(context.Context, domain.DirectorySyncState, time.Time) error
	DeviceDirectory() domain.DeviceDirectory
}

type Options

type Options struct {
	Logger *slog.Logger
	Now    func() time.Time
	Jitter func(time.Duration) time.Duration
	Wait   func(context.Context, time.Duration) bool
}

type Synchronizer

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

func New

func New(lister devicesapi.Lister, store DirectoryStore, options Options) *Synchronizer

func (*Synchronizer) Run

func (s *Synchronizer) Run(ctx context.Context)

Jump to

Keyboard shortcuts

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