forked from TrueCloudLab/rclone
union: enable passing of options to upstreams and policies #6071
This factors out the options into a sub package so they can be passed to upstreams and used in policies.
This commit is contained in:
parent
4f94b27800
commit
1d2fe0d856
3 changed files with 25 additions and 15 deletions
16
backend/union/common/options.go
Normal file
16
backend/union/common/options.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Package common defines code common to the union and the policies
|
||||
//
|
||||
// These need to be defined in a separate package to avoid import loops
|
||||
package common
|
||||
|
||||
import "github.com/rclone/rclone/fs"
|
||||
|
||||
// Options defines the configuration for this backend
|
||||
type Options struct {
|
||||
Upstreams fs.SpaceSepList `config:"upstreams"`
|
||||
Remotes fs.SpaceSepList `config:"remotes"` // Deprecated
|
||||
ActionPolicy string `config:"action_policy"`
|
||||
CreatePolicy string `config:"create_policy"`
|
||||
SearchPolicy string `config:"search_policy"`
|
||||
CacheTime int `config:"cache_time"`
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue