-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For a while now we've wanted to carve a "local" package out of actions that both p2p and actions can use. (Okay, we might get right of actions entirely, I'm not sure yet). This starts that process, and already it's feelin' like a great move. I want to call it "base" instead of "core" b/c IPFS already has very developed terminology around the word "core".
- Loading branch information
Showing
33 changed files
with
721 additions
and
356 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
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 was deleted.
Oops, something went wrong.
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,37 @@ | ||
// Package base defines business that operates on local data | ||
// it's main job is to composing APIs from the lower half of our tech stack, | ||
// providing uniform functions for higher up packages, mainly p2p and actions. | ||
// p2p and actions should use base as the only way of operate on the local repo | ||
// Here's some ascii art to clarify the stack: | ||
// | ||
// ┌───────────────┐ ┌───────────────┐ | ||
// │ cmd │ │ api │ | ||
// └───────────────┘ └───────────────┘ | ||
// ┌─────────────────────────────────┐ | ||
// │ lib │ | ||
// └─────────────────────────────────┘ | ||
// ┌─────────────────────────────────┐ | ||
// │ actions │ | ||
// └─────────────────────────────────┘ | ||
// ┌───────────────────────┐ | ||
// │ p2p │ | ||
// └───────────────────────┘ | ||
// ┌─────────────────────────────────┐ | ||
// │ base │ <-- you are here | ||
// └─────────────────────────────────┘ | ||
// ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐ | ||
// │ repo │ │ dsfs │ │ cafs │ │ ... │ | ||
// └──────┘ └──────┘ └──────┘ └──────┘ | ||
// | ||
// There are packages omitted from this diagram, but these are the vitals. | ||
// base functions mainly work with repo.Repo instances, using repo interface methods | ||
// and related packages to do their work. This is part of a larger pattern of | ||
// having actions rely on lower level interfaces wherever possible to enhance | ||
// configurability | ||
package base | ||
|
||
import ( | ||
golog "github.com/ipfs/go-log" | ||
) | ||
|
||
var log = golog.Logger("base") |
Oops, something went wrong.