Skip to content

Change MaxRecordAge from const to var#409

Closed
cpacia wants to merge 1 commit intolibp2p:masterfrom
cpacia:master
Closed

Change MaxRecordAge from const to var#409
cpacia wants to merge 1 commit intolibp2p:masterfrom
cpacia:master

Conversation

@cpacia
Copy link
Copy Markdown

@cpacia cpacia commented Nov 13, 2019

This change is to make MaxRecordAge configurable from outside the package so
users can set a custom record expiration in their projects.

closes #408

This change is to make MaxRecordAge configurable from outside the package so
users can set a custom record expiration in their projects.
@Stebalien
Copy link
Copy Markdown
Member

@vyzo's right that we "pretty much do this everywhere". But we really shouldn't use this for anything but debugging.

Would adding a functional option work? (opts/options.go)

@aarshkshah1992
Copy link
Copy Markdown
Contributor

@cpacia Having a functional option is cleaner. Please do let me know if you'd like me to come up with a PR. This is also nice to have for #388.

@cpacia
Copy link
Copy Markdown
Author

cpacia commented Nov 14, 2019

Yeah I can make the change. Will try to do it this weekend.

@aarshkshah1992 if you feel like you can more quickly add it to your PR, let me know.

@aarshkshah1992
Copy link
Copy Markdown
Contributor

@cpacia Please take a look at #410. We can now close this PR.

@Stebalien Stebalien closed this Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configurable MaxRecordAge

3 participants