24a32af3f1
fsrepo components simplification: directly use datastore
2015-03-11 12:55:13 -07:00
695b2c491a
Rename variable to avoid collision with the path package
2015-03-11 12:37:26 -07:00
fb39a30c14
fsrepo components simplification: directly use eventlog
2015-03-11 12:14:27 -07:00
1064d5e01f
Rename variable to avoid collision with the path package
2015-03-11 11:10:13 -07:00
22b6ee328b
fsrepo components simplification: directly use config
2015-03-11 11:04:33 -07:00
0d34b026d5
Ensure FSRepo implements Repo
2015-03-11 10:41:02 -07:00
c28944ce6c
have repo tilde expand paths
2015-02-12 05:09:12 +00:00
454cd454ea
feat(fsrepo) add eventlog config to repo/config struct
2015-02-02 17:49:19 -08:00
98ad33e005
refactor(eventlog) integrate into fsrepo
...
now, eventlogger works wherever the fsrepo is used
2015-01-24 01:37:03 -08:00
a5ee2efe43
move dir package
2015-01-24 01:32:27 -08:00
bd1d8767eb
doc(fsrepo): explain ConfigAt
2015-01-14 10:06:55 -08:00
12116dd6e4
style(fsrepo): rename to counter.Openers
2015-01-14 09:18:57 -08:00
6396123b7f
feat(fsrepo): expose Datastore in FSRepo interface (+ test)
2015-01-14 09:14:16 -08:00
ece9ed0933
feat(fsrepo): integrate datastore component into FSRepo
...
"for each desired change, make the change easy (warning: this may be
hard), then make the easy change" - Kent Beck
https://twitter.com/KentBeck/status/250733358307500032
http://martinfowler.com/articles/preparatory-refactoring-example.html
cc @jbenet @whyrusleeping
2015-01-14 08:41:45 -08:00
7ad559b8c7
refactor(fsrepo, component): expose SetPath to ensure that components handle paths
2015-01-14 08:41:45 -08:00
b660305142
extract initCheckDir to dir.Writable
2015-01-14 08:41:45 -08:00
887fbe4a8e
style(fsrepo) change func to method to be consistent
2015-01-14 08:41:45 -08:00
9f67ede6b2
refactor(fsrepo) extract component.Component
2015-01-14 08:41:44 -08:00
f37646bf19
refactor(fsrepo) add interface to make it easier to understand how to extend the package
2015-01-14 08:41:44 -08:00
c364b4c34c
refactor(fsrepo): extract configCompoenent
...
The struct was getting unmanageable. extracted the config component to
reduce complexity. The datastore will be written as another component.
2015-01-14 08:41:44 -08:00
9a054c5800
doc(fsrepo)
2015-01-14 06:08:42 -08:00
ac530d0ab6
refactor(fsrepo) move Close under Open
2015-01-14 06:08:36 -08:00
70dab069bd
doc(fsrepo)
2015-01-14 06:08:30 -08:00
6ec60ba861
feat(fsrepo): document lock usage and make the fsrepo thread-safe
...
fix(fsrepo): extract private, unsynced method to prevent deadlock
2015-01-14 03:57:52 -08:00
a3d2362691
use a single coarse package lock
2015-01-14 03:02:24 -08:00
53e6a9bd1a
fix(fsrepo): remove the Closer after closing it.
2015-01-14 03:02:23 -08:00
6ec20b3574
huh
2015-01-14 03:02:23 -08:00
76202a9444
fix(repo): clean the path before using it
...
no issue detected but it's good to be safe
2015-01-14 03:02:23 -08:00
40e41d24f7
feat(fsrepo): protect with a repo lockfile
...
NB: daemon is one spot the repo lock is typically acquired
2015-01-14 03:02:23 -08:00
3eafb3e5ab
style(repo): repo.Interface -> repo.Repo
...
The pkg.Interface style is modeled after heap.Interface. Generally, I
find it helpful for interfaces that have many implementations. It
provides clear distinction between the generic interface and the |n|
implementations that implement it (which may be interface types
themselves).
For clients who cannot keep the repo name, one can imagine that the most
likely rename is `ipfsrepo`. In that case, `ipfsrepo.Interface` remains
meaningful.
This is low-pri so it doesn't matter than much. But for the record, the
repo.Interface feels appropriate in this use-case.
2015-01-13 03:09:33 -08:00
89afdabb7e
refactor(fsrepo): move OpenerCounter
2015-01-13 03:09:33 -08:00
4aba282379
feat(fsrepo): handle safe Removal
2015-01-13 03:09:33 -08:00
631d2154f2
fix(fsrepo): use "please run ipfs init" message
2015-01-13 03:09:32 -08:00
e84fc5df22
fix(config): avoid clobbering user-provided key value pairs
...
let me know if this looks off @whyrusleeping @jbenet
2015-01-13 03:09:32 -08:00
bbaf70974d
move utility method
2015-01-13 03:09:32 -08:00
306c7e2e7b
doc(fsrepo)
2015-01-13 03:09:32 -08:00
b54c7de48c
fix(fsrepo): add guard to ConfigKey methods
2015-01-13 03:09:32 -08:00
3986af7691
refactor(repo): move public methods
2015-01-13 03:09:32 -08:00
47e4a35e6b
refactor(repo): privatize serialization methods
2015-01-13 03:09:32 -08:00
86258face6
refactor(config, repo): use repo.Interface to (Get|Set)ConfigKey
2015-01-13 03:09:32 -08:00
1b700864f9
refactor(repo): all config writes must go through repo
2015-01-13 03:09:31 -08:00
405afd2a02
refactor(config, repo): all writes go through FSRepo. next: privatize these
2015-01-13 03:09:31 -08:00
c2877b2045
refactor(init, repo): init logs in fsrepo
2015-01-13 03:09:31 -08:00
c5da1561b9
check datastore directory when opening the repo for use
2015-01-13 03:09:31 -08:00
fa4cfe8da2
refactor(init, fsrepo): go through repo to write to config
2015-01-13 03:09:30 -08:00
44f3d95c3b
refactor(repo/fsrepo): use repo to check whether config exists
2015-01-13 03:09:30 -08:00