在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:FleekHQ/space-daemon开源软件地址:https://github.com/FleekHQ/space-daemon开源编程语言:Go 99.3%开源软件介绍:Space DaemonSpace Daemon is a wrapper built in Go around awesome IPFS tools so that you can have start coding a decentralized desktop app as fast as possible. It's built on top of Textile Threads and Buckets. Out of the box it includes:
Note: This project is in active development, so it might change its API until it reaches a stable version. InstallationBy default, Space Daemon connects to hosted services provided by Fleek. This should be good if you just want to get it running quickly. However, if you want to connect to your own services, read the Modules Section. Downloading the binaryCheck out the releases here. You can download the latest version for your OS and you should be good to go. If you want to run Space Daemon by source, check out this section UsageSpace Daemon provides a gRPC interface. You can read its proto schema here. It contains methods to:
You can also use the JavaScript client here https://github.com/FleekHQ/space-client This can be useful if, for example, you are building a web app that needs to interact with a user's locally running Space Daemon. ModulesSpace Daemon requires a few modules to run successfully. If you downloaded the binary, you don't have to worry about this since it will be connecting to our services. It's good to understand what's happening behind the scenes though. IPFS NodeAll encrypted files are stored in an IPFS node. For convenience, Space Daemon runs an embedded node within the daemon that can be configured as well as the option to specify an external node to connect to. If you have your own node outside of the daemon, then set the flag In the case you are running the embedded IPFS node, you can further configure the listen address and data directory by setting these flags respectively: Textile HubRequired for sharing files between users and backing it up. It stores all backed up files encrypted using a set of keys so that only you, and people you share files with, can read the data. We host our own instance of the Textile Hub, and by default, Space Daemon will conect to it. It can be customized by providing the If you want to host your own Textile Hub node, you can read its documentation here Space ServicesWe provide hosted alternatives for these services. You can deploy your own by following the instructions in its repo: https://github.com/fleekHQ/space-services IdentityThese are centralized services that are optional, but offer additional convenience. Used mainly for identity. By using these services, you can allow users to claim usernames, so that Space Daemon can know the public key of a given username and in that way share files via username without having to input public keys directly. AuthenticationOur hosted Textile Hub requires authentication via public key for logging in. This service sends a challenge to Space Daemon, which signs the challenge with the private key of the user and in that way our hosted Textile Hub can allow the user to store data. Running from sourceAfter cloning this repo, you can run it from source by running
Alternatively, you can run ContributtingWe are happy to receive issues and review pull requests. Please make sure to write tests for the code you are introducing and make sure it doesn't break already passing tests. Read the following sections for an introduction into the code. Package StructureLoosely based on these resources: https://github.com/golang-standards/project-layout
Main classes
Generating MocksMocks are generated using https://github.com/vektra/mockery. For Linux it needs to be built from source.
ProtobufIf you update the gRPC API, you need to regenerate the Protobuf file. You will need to install the following binaries in your Go path:
Checking the binaries:
Run the protobuf generation:
Run the REST proxy generation:
** Ideally you should run NOTE: See here for instructions on Reverse Proxy: https://github.com/grpc-ecosystem/grpc-gateway Debugging, Profiling and TracingThe following flags can be run with the binary to output profiling files for debugging.
Flags support a full path to a file.
By default, the binary runs in debug mode (this may change after release) and it boots a pprof server in localhost:6060. See docs how to interact with pprof server here: https://github.com/google/pprof/blob/master/doc/README.md To disable debug mode add this flag to binary arguments
To enable trace in the daemon, pass CI SecretsSecrets are set by adding them in Github and then specifying them in If specified, the release file will dynamically generate the secret name based on the stage by adding a Stage specific secret names will only be used for secrets in So to add a new secret:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论