Documentation ¶
Overview ¶
Package cache implements the Fs cache
Index ¶
- func Canonicalize(fsString string) string
- func Clear()
- func Get(ctx context.Context, fsString string) (f fs.Fs, err error)
- func GetFn(ctx context.Context, fsString string, ...) (f fs.Fs, err error)
- func Pin(f fs.Fs)
- func PinUntilFinalized(f fs.Fs, x interface{})
- func Put(fsString string, f fs.Fs)
- func Unpin(f fs.Fs)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Canonicalize ¶ added in v1.53.0
Canonicalize looks up fsString in the mapping from user supplied names to canonical names and return the canonical form
func GetFn ¶
func GetFn(ctx context.Context, fsString string, create func(ctx context.Context, fsString string) (fs.Fs, error)) (f fs.Fs, err error)
GetFn gets an fs.Fs named fsString either from the cache or creates it afresh with the create function
func PinUntilFinalized ¶ added in v1.53.0
PinUntilFinalized pins f into the cache until x is garbage collected
This calls runtime.SetFinalizer on x so it shouldn't have a finalizer already.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.