Make the async propagation delay configurable
This commit is contained in:
@@ -91,10 +91,16 @@ type Drivers struct {
|
|||||||
Local LocalDriver `yaml:",omitempty"` // not supported by the oCIS product, therefore not part of docs
|
Local LocalDriver `yaml:",omitempty"` // not supported by the oCIS product, therefore not part of docs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AsyncPropagatorOptions configures the async propagator
|
||||||
|
type AsyncPropagatorOptions struct {
|
||||||
|
PropagationDelay time.Duration `yaml:"propagation_delay" env:"STORAGE_USERS_ASYNC_PROPAGATOR_PROPAGATION_DELAY" desc:"The delay between a change to tree and the start of the according treesize and treetime propagation."`
|
||||||
|
}
|
||||||
|
|
||||||
// OCISDriver is the storage driver configuration when using 'ocis' storage driver
|
// OCISDriver is the storage driver configuration when using 'ocis' storage driver
|
||||||
type OCISDriver struct {
|
type OCISDriver struct {
|
||||||
MetadataBackend string `yaml:"metadata_backend" env:"OCIS_DECOMPOSEDFS_METADATA_BACKEND;STORAGE_USERS_OCIS_METADATA_BACKEND" desc:"The backend to use for storing metadata. Supported values are 'messagepack' and 'xattrs'. The setting 'messagepack' uses a dedicated file to store file metadata while 'xattrs' uses extended attributes to store file metadata. Defaults to 'messagepack'."`
|
MetadataBackend string `yaml:"metadata_backend" env:"OCIS_DECOMPOSEDFS_METADATA_BACKEND;STORAGE_USERS_OCIS_METADATA_BACKEND" desc:"The backend to use for storing metadata. Supported values are 'messagepack' and 'xattrs'. The setting 'messagepack' uses a dedicated file to store file metadata while 'xattrs' uses extended attributes to store file metadata. Defaults to 'messagepack'."`
|
||||||
Propagator string `yaml:"propagator" env:"OCIS_DECOMPOSEDFS_PROPAGATOR;STORAGE_USERS_OCIS_PROPAGATOR" desc:"The propagator used for decomposedfs. At the moment, only 'sync' is fully supported, 'async' is available as an experimental option."`
|
Propagator string `yaml:"propagator" env:"OCIS_DECOMPOSEDFS_PROPAGATOR;STORAGE_USERS_OCIS_PROPAGATOR" desc:"The propagator used for decomposedfs. At the moment, only 'sync' is fully supported, 'async' is available as an experimental option."`
|
||||||
|
AsyncPropagatorOptions AsyncPropagatorOptions `yaml:"async_propagator_options"`
|
||||||
// Root is the absolute path to the location of the data
|
// Root is the absolute path to the location of the data
|
||||||
Root string `yaml:"root" env:"STORAGE_USERS_OCIS_ROOT" desc:"The directory where the filesystem storage will store blobs and metadata. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH:/storage/users."`
|
Root string `yaml:"root" env:"STORAGE_USERS_OCIS_ROOT" desc:"The directory where the filesystem storage will store blobs and metadata. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH:/storage/users."`
|
||||||
UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_OCIS_USER_LAYOUT" desc:"Template string for the user storage layout in the user directory."`
|
UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_OCIS_USER_LAYOUT" desc:"Template string for the user storage layout in the user directory."`
|
||||||
@@ -116,8 +122,9 @@ type OCISDriver struct {
|
|||||||
|
|
||||||
// S3NGDriver is the storage driver configuration when using 's3ng' storage driver
|
// S3NGDriver is the storage driver configuration when using 's3ng' storage driver
|
||||||
type S3NGDriver struct {
|
type S3NGDriver struct {
|
||||||
MetadataBackend string `yaml:"metadata_backend" env:"STORAGE_USERS_S3NG_METADATA_BACKEND" desc:"The backend to use for storing metadata. Supported values are 'xattrs' and 'messagepack'. The setting 'xattrs' uses extended attributes to store file metadata while 'messagepack' uses a dedicated file to store file metadata. Defaults to 'xattrs'."`
|
MetadataBackend string `yaml:"metadata_backend" env:"STORAGE_USERS_S3NG_METADATA_BACKEND" desc:"The backend to use for storing metadata. Supported values are 'xattrs' and 'messagepack'. The setting 'xattrs' uses extended attributes to store file metadata while 'messagepack' uses a dedicated file to store file metadata. Defaults to 'xattrs'."`
|
||||||
Propagator string `yaml:"propagator" env:"OCIS_DECOMPOSEDFS_PROPAGATOR;STORAGE_USERS_S3NG_PROPAGATOR" desc:"The propagator used for decomposedfs. At the moment, only 'sync' is fully supported, 'async' is available as an experimental option."`
|
Propagator string `yaml:"propagator" env:"OCIS_DECOMPOSEDFS_PROPAGATOR;STORAGE_USERS_S3NG_PROPAGATOR" desc:"The propagator used for decomposedfs. At the moment, only 'sync' is fully supported, 'async' is available as an experimental option."`
|
||||||
|
AsyncPropagatorOptions AsyncPropagatorOptions `yaml:"async_propagator_options"`
|
||||||
// Root is the absolute path to the location of the data
|
// Root is the absolute path to the location of the data
|
||||||
Root string `yaml:"root" env:"STORAGE_USERS_S3NG_ROOT" desc:"The directory where the filesystem storage will store metadata for blobs. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH:/storage/users."`
|
Root string `yaml:"root" env:"STORAGE_USERS_S3NG_ROOT" desc:"The directory where the filesystem storage will store metadata for blobs. If not defined, the root directory derives from $OCIS_BASE_DATA_PATH:/storage/users."`
|
||||||
UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_S3NG_USER_LAYOUT" desc:"Template string for the user storage layout in the user directory."`
|
UserLayout string `yaml:"user_layout" env:"STORAGE_USERS_S3NG_USER_LAYOUT" desc:"Template string for the user storage layout in the user directory."`
|
||||||
|
|||||||
@@ -115,8 +115,11 @@ func OwnCloudSQL(cfg *config.Config) map[string]interface{} {
|
|||||||
// Ocis is the config mapping for the Ocis storage driver
|
// Ocis is the config mapping for the Ocis storage driver
|
||||||
func Ocis(cfg *config.Config) map[string]interface{} {
|
func Ocis(cfg *config.Config) map[string]interface{} {
|
||||||
return map[string]interface{}{
|
return map[string]interface{}{
|
||||||
"metadata_backend": cfg.Drivers.OCIS.MetadataBackend,
|
"metadata_backend": cfg.Drivers.OCIS.MetadataBackend,
|
||||||
"propagator": cfg.Drivers.OCIS.Propagator,
|
"propagator": cfg.Drivers.OCIS.Propagator,
|
||||||
|
"async_propagator_options": map[string]interface{}{
|
||||||
|
"propagation_delay": cfg.Drivers.OCIS.AsyncPropagatorOptions.PropagationDelay,
|
||||||
|
},
|
||||||
"root": cfg.Drivers.OCIS.Root,
|
"root": cfg.Drivers.OCIS.Root,
|
||||||
"user_layout": cfg.Drivers.OCIS.UserLayout,
|
"user_layout": cfg.Drivers.OCIS.UserLayout,
|
||||||
"share_folder": cfg.Drivers.OCIS.ShareFolder,
|
"share_folder": cfg.Drivers.OCIS.ShareFolder,
|
||||||
@@ -171,8 +174,11 @@ func Ocis(cfg *config.Config) map[string]interface{} {
|
|||||||
// OcisNoEvents is the config mapping for the ocis storage driver emitting no events
|
// OcisNoEvents is the config mapping for the ocis storage driver emitting no events
|
||||||
func OcisNoEvents(cfg *config.Config) map[string]interface{} {
|
func OcisNoEvents(cfg *config.Config) map[string]interface{} {
|
||||||
return map[string]interface{}{
|
return map[string]interface{}{
|
||||||
"metadata_backend": cfg.Drivers.OCIS.MetadataBackend,
|
"metadata_backend": cfg.Drivers.OCIS.MetadataBackend,
|
||||||
"propagator": cfg.Drivers.OCIS.Propagator,
|
"propagator": cfg.Drivers.OCIS.Propagator,
|
||||||
|
"async_propagator_options": map[string]interface{}{
|
||||||
|
"propagation_delay": cfg.Drivers.OCIS.AsyncPropagatorOptions.PropagationDelay,
|
||||||
|
},
|
||||||
"root": cfg.Drivers.OCIS.Root,
|
"root": cfg.Drivers.OCIS.Root,
|
||||||
"user_layout": cfg.Drivers.OCIS.UserLayout,
|
"user_layout": cfg.Drivers.OCIS.UserLayout,
|
||||||
"share_folder": cfg.Drivers.OCIS.ShareFolder,
|
"share_folder": cfg.Drivers.OCIS.ShareFolder,
|
||||||
@@ -226,8 +232,11 @@ func S3(cfg *config.Config) map[string]interface{} {
|
|||||||
// S3NG is the config mapping for the s3ng storage driver
|
// S3NG is the config mapping for the s3ng storage driver
|
||||||
func S3NG(cfg *config.Config) map[string]interface{} {
|
func S3NG(cfg *config.Config) map[string]interface{} {
|
||||||
return map[string]interface{}{
|
return map[string]interface{}{
|
||||||
"metadata_backend": cfg.Drivers.S3NG.MetadataBackend,
|
"metadata_backend": cfg.Drivers.S3NG.MetadataBackend,
|
||||||
"propagator": cfg.Drivers.S3NG.Propagator,
|
"propagator": cfg.Drivers.S3NG.Propagator,
|
||||||
|
"async_propagator_options": map[string]interface{}{
|
||||||
|
"propagation_delay": cfg.Drivers.S3NG.AsyncPropagatorOptions.PropagationDelay,
|
||||||
|
},
|
||||||
"root": cfg.Drivers.S3NG.Root,
|
"root": cfg.Drivers.S3NG.Root,
|
||||||
"user_layout": cfg.Drivers.S3NG.UserLayout,
|
"user_layout": cfg.Drivers.S3NG.UserLayout,
|
||||||
"share_folder": cfg.Drivers.S3NG.ShareFolder,
|
"share_folder": cfg.Drivers.S3NG.ShareFolder,
|
||||||
@@ -286,8 +295,11 @@ func S3NG(cfg *config.Config) map[string]interface{} {
|
|||||||
// S3NGNoEvents is the config mapping for the s3ng storage driver emitting no events
|
// S3NGNoEvents is the config mapping for the s3ng storage driver emitting no events
|
||||||
func S3NGNoEvents(cfg *config.Config) map[string]interface{} {
|
func S3NGNoEvents(cfg *config.Config) map[string]interface{} {
|
||||||
return map[string]interface{}{
|
return map[string]interface{}{
|
||||||
"metadata_backend": cfg.Drivers.S3NG.MetadataBackend,
|
"metadata_backend": cfg.Drivers.S3NG.MetadataBackend,
|
||||||
"propagator": cfg.Drivers.S3NG.Propagator,
|
"propagator": cfg.Drivers.S3NG.Propagator,
|
||||||
|
"async_propagator_options": map[string]interface{}{
|
||||||
|
"propagation_delay": cfg.Drivers.S3NG.AsyncPropagatorOptions.PropagationDelay,
|
||||||
|
},
|
||||||
"root": cfg.Drivers.S3NG.Root,
|
"root": cfg.Drivers.S3NG.Root,
|
||||||
"user_layout": cfg.Drivers.S3NG.UserLayout,
|
"user_layout": cfg.Drivers.S3NG.UserLayout,
|
||||||
"share_folder": cfg.Drivers.S3NG.ShareFolder,
|
"share_folder": cfg.Drivers.S3NG.ShareFolder,
|
||||||
|
|||||||
Reference in New Issue
Block a user