mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-11 00:09:46 -05:00
Configure the nats service for the system storage extension
This commit is contained in:
@@ -13,8 +13,9 @@ type Config struct {
|
||||
Log *Log `yaml:"log"`
|
||||
Debug Debug `yaml:"debug"`
|
||||
|
||||
GRPC GRPCConfig `yaml:"grpc"`
|
||||
HTTP HTTPConfig `yaml:"http"`
|
||||
GRPC GRPCConfig `yaml:"grpc"`
|
||||
HTTP HTTPConfig `yaml:"http"`
|
||||
Events Events `yaml:"events"`
|
||||
|
||||
TokenManager *TokenManager `yaml:"token_manager"`
|
||||
Reva *Reva `yaml:"reva"`
|
||||
@@ -77,3 +78,8 @@ type OCISDriver struct {
|
||||
// Root is the absolute path to the location of the data
|
||||
Root string `yaml:"root" env:"STORAGE_SYSTEM_OCIS_ROOT"`
|
||||
}
|
||||
|
||||
type Events struct {
|
||||
Addr string `yaml:"endpoint" env:"STORAGE_SYSTEM_EVENTS_ENDPOINT" desc:"the address of the streaming service"`
|
||||
ClusterID string `yaml:"cluster" env:"STORAGE_SYSTEM_EVENTS_CLUSTER" desc:"the clusterID of the streaming service. Mandatory when using nats"`
|
||||
}
|
||||
|
||||
@@ -47,12 +47,14 @@ func StorageUsersConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
// TODO build services dynamically
|
||||
"services": map[string]interface{}{
|
||||
"dataprovider": map[string]interface{}{
|
||||
"prefix": cfg.HTTP.Prefix,
|
||||
"driver": cfg.Driver,
|
||||
"drivers": UserDrivers(cfg),
|
||||
"timeout": 86400,
|
||||
"insecure": cfg.DataProviderInsecure,
|
||||
"disable_tus": false,
|
||||
"prefix": cfg.HTTP.Prefix,
|
||||
"driver": cfg.Driver,
|
||||
"drivers": UserDrivers(cfg),
|
||||
"timeout": 86400,
|
||||
"insecure": cfg.DataProviderInsecure,
|
||||
"disable_tus": false,
|
||||
"nats_address": cfg.Events.Addr,
|
||||
"nats_clusterID": cfg.Events.ClusterID,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user