Skip to content

configure custom backup handler (e.g. store backup in S3) #8160

Answered by chriswk
lakedude asked this question in Q&A
Discussion options

You must be logged in to vote

I see I need to upgrade my reading skills. Because you're asking for the write side of the backup to also be customizable. You'd need to look into a custom instance of FeatureRepository, which accepts a BackupHandler (which exposes both write and read).

We don't want to have s3 as a dependency in the unleash sdk.

So work needed would be

  1. Write an S3BackUpHandler which implements BackupHandler
  2. Instantiate the FeatureRepository with your own backuphandler
    FeatureRepository fr = new FeatureRepository(unleashConfig, s3BackupHandler);
  3. Pass your FeatureRepository to DefaultUnleash's constructor
    new DefaultUnleash(UnleashConfig, fr, ...anyCustomStrategies)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@chriswk
Comment options

Answer selected by lakedude
@lakedude
Comment options

@chriswk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants