mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
coreapi: drop nameopt.Local in favour of api.Offline
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com> This commit was moved from ipfs/interface-go-ipfs-core@42d3b2edfa This commit was moved from ipfs/boxo@57bf11c160
This commit is contained in:
parent
5da159b33c
commit
322654a45f
@ -20,7 +20,6 @@ type NamePublishSettings struct {
|
||||
}
|
||||
|
||||
type NameResolveSettings struct {
|
||||
Local bool
|
||||
Cache bool
|
||||
|
||||
ResolveOpts []ropts.ResolveOpt
|
||||
@ -49,7 +48,6 @@ func NamePublishOptions(opts ...NamePublishOption) (*NamePublishSettings, error)
|
||||
|
||||
func NameResolveOptions(opts ...NameResolveOption) (*NameResolveSettings, error) {
|
||||
options := &NameResolveSettings{
|
||||
Local: false,
|
||||
Cache: true,
|
||||
}
|
||||
|
||||
@ -106,15 +104,6 @@ func (nameOpts) TTL(ttl time.Duration) NamePublishOption {
|
||||
}
|
||||
}
|
||||
|
||||
// Local is an option for Name.Resolve which specifies if the lookup should be
|
||||
// offline. Default value is false
|
||||
func (nameOpts) Local(local bool) NameResolveOption {
|
||||
return func(settings *NameResolveSettings) error {
|
||||
settings.Local = local
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// Cache is an option for Name.Resolve which specifies if cache should be used.
|
||||
// Default value is true
|
||||
func (nameOpts) Cache(cache bool) NameResolveOption {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user