-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the tempdir used for working with c1zs to be configurable. #77
Conversation
…re that we write partial c1zs back correctly.
ebbf4c8
to
d732859
Compare
} | ||
|
||
// Returns a C1File instance for the given db filepath. | ||
func NewC1File(ctx context.Context, dbFilePath string) (*C1File, error) { | ||
func NewC1File(ctx context.Context, dbFilePath string, opts ...C1FOption) (*C1File, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit: not sure why this can't just be New()
instead of NewC1File
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package also contains NewC1ZFile()
, so I think it was to disambiguate. We could probably move the details of that function into an option for this function. Will consider that in a separate PR since it'd be API breaking.
The default OS tempdir might not be in the place that we'd prefer it to be. Instead of asking users to change the default path systemwide, allow users to configure it while using the SDK.
c1z-temp-dir
cli flag to any SDK connectorsAlso fixes a bug where failed syncs(local, not service mode) were not properly writing c1zs back to the original file. This enables syncs to be resumed properly.