mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-12 04:07:14 -04:00
injected config down the tree
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// NewService creates a grpc service
|
||||
func NewService(c context.Context) grpc.Service {
|
||||
func NewService(c context.Context, cfg *config.Config) grpc.Service {
|
||||
service := grpc.NewService(
|
||||
// TODO options come from configuration
|
||||
grpc.Name("accounts"),
|
||||
@@ -19,7 +19,7 @@ func NewService(c context.Context) grpc.Service {
|
||||
grpc.Context(c),
|
||||
)
|
||||
|
||||
hdlr := svc.New(config.New())
|
||||
hdlr := svc.New(cfg)
|
||||
proto.RegisterSettingsServiceHandler(service.Server(), hdlr)
|
||||
|
||||
service.Init()
|
||||
|
||||
Reference in New Issue
Block a user