sync

package
v0.1.4-0...-8b98d0b Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RepoDir            string        `yaml:"repoDir" validate:"nonzero"`
	Interval           time.Duration `yaml:"interval" validate:"nonzero"`
	PrivateKeyPath     string        `yaml:"privateKeyPath" validate:"nonzero"`
	PrivateKeyPassword string        `yaml:"privateKeyPassword"`
	KnownHostsPath     string        `yaml:"knownHostsPath" validate:"nonzero"`
}

Config defines configuration params for periodically syncing graph to a git repository.

type Syncer

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

Syncer is a git syncer.

func NewSyncer

func NewSyncer(
	c *Config, log *logr.LogR,
) (*Syncer, error)

NewSyncer creates a new Syncer.

func (*Syncer) Run

func (s *Syncer) Run() error

Run starts the graph sync.

func (*Syncer) Stop

func (s *Syncer) Stop(_ context.Context) error

Stop stops the sync ticker and goroutine, cleans up allocated resources.

func (*Syncer) Trigger

func (s *Syncer) Trigger()

Trigger triggers a sync.

Jump to

Keyboard shortcuts

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