example plugin for Kubo
This repository contains a set of example Kubo plugins, demonstrating how to integrate external plugins into Kubo.
Packages:
- delaystore: an example datastore plugin that wraps an inner datastore in a "delayed" datastore.
- greeter: an example daemon plugin that prints "Hello!" on start and "Goodbye!" on exit.
NOTE 1: Plugins only work on Linux and MacOS at the moment. You can track the progress of this issue here: golang/go#19282
NOTE 2: This plugin exists as an example and a starting point for new plugins. It isn't particularly useful by itself.
You can build the example plugin by running make build
. You can then install it into your local IPFS repo by running make install
.
Plugins need to be built against the correct version of Kubo. This package generally tracks the latest Kubo release but if you need to build against a different version, please set the IPFS_VERSION
environment variable.
You can set IPFS_VERSION
to:
vX.Y.Z
to build against that version of IPFS.$commit
or$branch
to build against a specific Kubo commit or branch.- Note: if building against a commit or branch make sure to build that commit/branch using the -trimpath flag. For example getting the binary via
go get -trimpath github.com/ipfs/kubo/cmd/ipfs@COMMIT
- Note: if building against a commit or branch make sure to build that commit/branch using the -trimpath flag. For example getting the binary via
/absolute/path/to/source
to build against a specific Kubo checkout.
To update the Kubo, run:
> make go.mod IPFS_VERSION=version
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.
MIT