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

docs: Add some docs on plugins #4255

Merged
merged 2 commits into from
Oct 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ plugin](https://github.com/ipfs/go-ipld-eth) that lets ipfs ingest and operate
on all ethereum blockchain data. Soon to come are plugins for the bitcoin and
zcash data formats. In the future, we will be adding plugins for other things
like datastore backends and specialized libp2p network transports.
You can read more on this topic in [Plugin docs](docs/plugins.md)

In order to simplify its integration with fs-repo-migrations, we've switched
the ipfs/go-ipfs docker image from a musl base to a glibc base. For most users
Expand Down
17 changes: 17 additions & 0 deletions docs/experimental-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,20 @@ Peers can see their (unspecific) relay address in the output of
dialing.
- [ ] Dialing priorities for relay addresses; arguably, relay addresses should
have lower priority than direct dials.

## Plugins

### In Version
0.4.11

Plugins allow to add functionality without the need to recompile the daemon.

### Basic Usage:

See [Plugin docs](./plugins.md)

### Road to being a real feature

- [ ] Better support for platforms other than Linux
- [ ] More plugins and plugin types
- [ ] Feedback on stability
49 changes: 49 additions & 0 deletions docs/plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Plugins

Since 0.4.11 go-ipfs has an experimental plugin system that allows augmenting
the daemons functionality without recompiling.

When an IPFS node is created, it will load plugins from the `$IPFS_PATH/plugins`
directory (by default `~/.ipfs/plugins`).

### Plugin types

#### IPLD
IPLD plugins add support for additional formats to `ipfs dag` and other IPLD
related commands.

### Supported plugins

| Name | Type |
|------|------|
| git | IPLD |

#### Installation

##### Linux

1. Build included plugins:
```bash
go-ipfs$ make build_plugins
go-ipfs$ ls plugin/plugins/*.so
```

3. Copy desired plugins to `$IPFS_PATH/plugins`
```bash
go-ipfs$ mkdir -p ~/.ipfs/plugins/
go-ipfs$ cp plugin/plugins/git.so ~/.ipfs/plugins/
go-ipfs$ chmod +x ~/.ipfs/plugins/git.so # ensure plugin is executable
```

4. Restart daemon if it is running

##### Other

Go currently only supports plugins on Linux, for other platforms you will need
to compile them into IPFS binary.

1. Uncomment plugin entries in `plugin/loader/preload_list`
2. Build ipfs
```bash
go-ipfs$ make build
```