Skip to content
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

Expose NewGoofys in github.com/kahing/goofys/api package #330

Merged
merged 1 commit into from
Sep 5, 2018
Merged

Expose NewGoofys in github.com/kahing/goofys/api package #330

merged 1 commit into from
Sep 5, 2018

Conversation

bgardiner
Copy link
Contributor

I'm currently extending goofys to add local caching for some specific use cases in which catfs does not serve our needs. However, the current API of the goofys/api package is very limited (as it only allows you to mount). It would be really useful to be able to create a goofys/internal.Goofys struct such that certain functions of the github.com/jacobsa/fuse/fuseutil.FileSystem interface can be overridden; but the associated goofys functions and types are currently walled off in the goofys/internal package, which cannot be imported.

This PR exposes a few of the functions and types from the internal package that enable extending goofys. I also added a GetFullName function I've found very useful. This PR makes no functional changes but would be awesome to have incorporated into the codebase from an extensibility standpoint.

@bensussman
Copy link
Contributor

Any update on this?

api/api.go Outdated
var (
GetStdLogger = internal.GetStdLogger
InitLoggers = internal.InitLoggers
MassaageMountFlags = internal.MassageMountFlags
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

misspelled massage

@kahing
Copy link
Owner

kahing commented Aug 23, 2018

Sorry for the delay, I haven't had much time with goofys lately. This looks fine, although I am a little hesitate to expose more internal APIs, but since goofys still is in 0.x and people should expect API changes, I guess it's ok.

Could you squash your commits?

extending and mounting elsewhere.
@bgardiner
Copy link
Contributor Author

@kahing Thanks for getting back to me. I squashed the commits and fixed the spelling of massage.

For what it's worth, the changes only expose additional functions so the API changes are backwards compatible.

@bgardiner
Copy link
Contributor Author

ping @kahing -- I think it's ready for merge

@kahing kahing merged commit feb9917 into kahing:master Sep 5, 2018
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.

3 participants