mirror of
https://github.com/owncloud/ocis
synced 2026-04-26 01:35:25 +02:00
sharpen eventhistory service
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package defaults
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
"github.com/owncloud/ocis/v2/services/eventhistory/pkg/config"
|
||||
)
|
||||
@@ -19,6 +21,19 @@ func DefaultConfig() *config.Config {
|
||||
Service: config.Service{
|
||||
Name: "eventhistory",
|
||||
},
|
||||
Events: config.Events{
|
||||
Endpoint: "127.0.0.1:9233",
|
||||
Cluster: "ocis-cluster",
|
||||
EnableTLS: false,
|
||||
},
|
||||
Store: config.Store{
|
||||
Type: "mem",
|
||||
RecordExpiry: 336 * time.Hour,
|
||||
},
|
||||
GRPC: config.GRPCConfig{
|
||||
Addr: "127.0.0.1:0",
|
||||
Namespace: "com.owncloud.api",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +57,15 @@ func EnsureDefaults(cfg *config.Config) {
|
||||
cfg.GRPCClientTLS = cfg.Commons.GRPCClientTLS
|
||||
}
|
||||
}
|
||||
|
||||
if cfg.GRPC.TLS == nil {
|
||||
cfg.GRPC.TLS = &shared.GRPCServiceTLS{}
|
||||
if cfg.Commons != nil && cfg.Commons.GRPCServiceTLS != nil {
|
||||
cfg.GRPC.TLS.Enabled = cfg.Commons.GRPCServiceTLS.Enabled
|
||||
cfg.GRPC.TLS.Cert = cfg.Commons.GRPCServiceTLS.Cert
|
||||
cfg.GRPC.TLS.Key = cfg.Commons.GRPCServiceTLS.Key
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Sanitize sanitizes the config
|
||||
|
||||
Reference in New Issue
Block a user