Use lazy initialization for the default grpc client
This avoids using a public global variable. It allows us to initialize the default client a bit later (outside of init()). That way we can e.g. properly initialize the in-memory registry.
This commit is contained in:
committed by
Ralf Haferkamp
parent
0ae75f8e66
commit
01650a5023
@@ -69,8 +69,8 @@ func NewService(opts ...Option) (Service, error) {
|
||||
config: conf,
|
||||
log: options.Logger,
|
||||
mux: m,
|
||||
searchClient: searchsvc.NewSearchProviderService("com.owncloud.api.search", grpc.DefaultClient),
|
||||
thumbnailsClient: thumbnailssvc.NewThumbnailService("com.owncloud.api.thumbnails", grpc.DefaultClient),
|
||||
searchClient: searchsvc.NewSearchProviderService("com.owncloud.api.search", grpc.DefaultClient()),
|
||||
thumbnailsClient: thumbnailssvc.NewThumbnailService("com.owncloud.api.thumbnails", grpc.DefaultClient()),
|
||||
revaClient: gwc,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user