@@ -29,6 +29,7 @@ const (
2929 TestConfigs SettingsKey = "testConfig"
3030 Plugins SettingsKey = "plugins"
3131 PluginsStrictOrder SettingsKey = "pluginsStrictOrder"
32+ checkpointFile SettingsKey = "checkpoint"
3233)
3334const configFile = "aw-sync-settings.yaml"
3435const configDir = "./config"
@@ -47,6 +48,7 @@ type Setts struct {
4748 AsService bool `yaml:"-"`
4849 Immediate bool `yaml:"-"`
4950 TestConfigs bool `yaml:"-"` // TestConfigs is a flag to test the configurations/filters
51+ CheckpointFile string `yaml:"checkpoint"`
5052}
5153
5254// Configuration struct
@@ -136,7 +138,7 @@ func loadFlags(config *Configuration) {
136138 flag .Var (& plugins , string (Plugins ), "Plugins to load" )
137139
138140 flag .BoolVar (& config .Settings .PluginsStrictOrder , string (PluginsStrictOrder ), config .Settings .PluginsStrictOrder , "Plugins strict order" )
139-
141+ flag . StringVar ( & config . Settings . CheckpointFile , string ( checkpointFile ), config . Settings . CheckpointFile , "Checkpoint File found" )
140142 flag .StringVar (& config .Settings .Cron , string (Cron ), config .Settings .Cron , "Cron expression" )
141143 flag .StringVar (& config .Settings .PrometheusSecretKey , string (PrometheusSecretKey ), config .Settings .PrometheusSecretKey , "Prometheus Secret Key" )
142144 flag .BoolVar (& config .Settings .AsService , string (AsService ), config .Settings .AsService , "Run as service" )
@@ -185,6 +187,7 @@ func printSettings(config *Configuration) {
185187 Plugins : strings .Join (config .Settings .Plugins , "," ),
186188 PluginsStrictOrder : fmt .Sprintf ("%t" , config .Settings .PluginsStrictOrder ),
187189 Cron : config .Settings .Cron ,
190+ checkpointFile : config .Settings .CheckpointFile ,
188191 }
189192
190193 // Define the order of the settings
@@ -198,6 +201,7 @@ func printSettings(config *Configuration) {
198201 Plugins ,
199202 PluginsStrictOrder ,
200203 Cron ,
204+ checkpointFile ,
201205 }
202206
203207 maxKeyLength := 0
0 commit comments