coreapi: implement --local with Offline option

License: MIT
Signed-off-by: Łukasz Magiera <magik6k@gmail.com>


This commit was moved from ipfs/interface-go-ipfs-core@286ea29c95

This commit was moved from ipfs/boxo@3b8f8c7c82
This commit is contained in:
Łukasz Magiera 2018-12-10 15:26:27 +01:00
parent 322654a45f
commit 2230c18f33

View File

@ -30,7 +30,6 @@ type UnixfsAddSettings struct {
Pin bool
OnlyHash bool
Local bool
FsCache bool
NoCopy bool
@ -60,7 +59,6 @@ func UnixfsAddOptions(opts ...UnixfsAddOption) (*UnixfsAddSettings, cid.Prefix,
Pin: false,
OnlyHash: false,
Local: false,
FsCache: false,
NoCopy: false,
@ -220,16 +218,6 @@ func (unixfsOpts) HashOnly(hashOnly bool) UnixfsAddOption {
}
}
// Local will add the data to blockstore without announcing it to the network
//
// Note that this doesn't prevent other nodes from getting this data
func (unixfsOpts) Local(local bool) UnixfsAddOption {
return func(settings *UnixfsAddSettings) error {
settings.Local = local
return nil
}
}
// Wrap tells the adder to wrap the added file structure with an additional
// directory.
func (unixfsOpts) Wrap(wrap bool) UnixfsAddOption {