-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CR feedback + docs WIP, linting, fix freebsd builds
- Loading branch information
Showing
12 changed files
with
114 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/*Package filesystem is an experimental package, that implements the go-ipfs daemon plugin interface | ||
and defines the plugins config structure. | ||
To set the multiaddr listen address, you may use the environment variable $IPFS_FS_ADDR, or set the option in a config file | ||
via `ipfs config --json 'Plugins.Plugins.filesystem.Config "Config":{"Service":{"9P":"/ip4/127.0.0.1/tcp/567"}}'` | ||
To disable this plugin entirely, use: `ipfs config --json Plugins.Plugins.filesystem.Disabled true` | ||
By default, we try to expose the IPFS namespace using the 9P2000.L protocol, over a unix domain socket | ||
(located at $IPFS_PATH/filesystem.9P.sock)*/ | ||
package filesystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/*Package fsnodes provides constructors and interfaces, for composing various 9P | ||
file systems implementations and wrappers. | ||
The default RootIndex provided by RootAttacher, is a file system of itself | ||
which relays request to various IPFS subsystems. | ||
Utilizing the subsystem implementations itself, in the same way a client program would.*/ | ||
package fsnodes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package fsnodes | ||
|
||
import ( | ||
"bytes" | ||
"strings" | ||
|
||
"github.com/djdv/p9/p9" | ||
) | ||
|
||
func ExampleRootIndex() { | ||
root, err := fsnodes.RootAttacher(ctx, coreAPI).Attach() | ||
_, file, err := root.Walk(strings.Split("ipfs/Qm.../subdir/file", "/")) | ||
_, _, err := file.Open(p9.ReadOnly) | ||
defer file.Close() | ||
_, err := file.ReadAt(byteBuffer, offset) | ||
} | ||
|
||
func ExampleIPFS() { | ||
ipfs, err := fsnodes.IPFSAttacher(ctx, coreAPI).Attach() | ||
_, file, err := ipfs.Walk(strings.Split("Qm.../subdir/file", "/")) | ||
_, _, err := file.Open(p9.ReadOnly) | ||
defer file.Close() | ||
_, err := file.ReadAt(byteBuffer, offset) | ||
} | ||
|
||
func ExamplePinFS() { | ||
ipfs, err := fsnodes.PinFSAttacher(ctx, coreAPI).Attach() | ||
_, dir, err := ipfs.Walk(nil) | ||
_, _, err := dir.Open(p9.ReadOnly) | ||
entries, err := dirClone.Readdir(offset, entryReturnCount) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.