@cryptotaxi247 / kubo / commits / 13ef17ef1

fixup comments

License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>

Jeromy committed Sep 21, 2015 at 18:07 UTC 13ef17ef16aaa9cce83426a8947e91776dc015fc
1 file changed +7 -8
mfs/system.go
+7 -8
@@ -39,7 +39,7 @@ const (
39 TDir
40 )
41
42 -// FSNode represents any node (directory, root, or file) in the ipns filesystem
42 +// FSNode represents any node (directory, root, or file) in the mfs filesystem
43 type FSNode interface {
44 GetNode() (*dag.Node, error)
45 Type() NodeType
@@ -47,12 +47,12 @@ type FSNode interface {
47 Unlock()
48 }
49
50 -// Root represents the root of a filesystem tree pointed to by a given keypair
50 +// Root represents the root of a filesystem tree
51 type Root struct {
52 - // node is the merkledag node pointed to by this keypair
52 + // node is the merkledag root
53 node *dag.Node
54
55 - // val represents the node pointed to by this key. It can either be a File or a Directory
55 + // val represents the node. It can either be a File or a Directory
56 val FSNode
57
58 repub *Republisher
@@ -64,8 +64,7 @@ type Root struct {
64
65 type PubFunc func(context.Context, key.Key) error
66
67 -// newRoot creates a new Root for the given key, and starts up a republisher routine
68 -// for it
67 +// newRoot creates a new Root and starts up a republisher routine for it
68 func NewRoot(parent context.Context, ds dag.DAGService, node *dag.Node, pf PubFunc) (*Root, error) {
69 ndk, err := node.Key()
70 if err != nil {
@@ -122,7 +121,7 @@ func (kr *Root) Close() error {
121 return kr.repub.Close()
122 }
123
125 -// Republisher manages when to publish the ipns entry associated with a given key
124 +// Republisher manages when to publish a given entry
125 type Republisher struct {
126 TimeoutLong time.Duration
127 TimeoutShort time.Duration
@@ -144,7 +143,7 @@ func (rp *Republisher) getVal() key.Key {
143 return rp.val
144 }
145
147 -// NewRepublisher creates a new Republisher object to republish the given keyroot
146 +// NewRepublisher creates a new Republisher object to republish the given root
147 // using the given short and long time intervals
148 func NewRepublisher(ctx context.Context, pf PubFunc, tshort, tlong time.Duration) *Republisher {
149 ctx, cancel := context.WithCancel(ctx)