config: allow setting directory sync interval and timeout (#1098)

Updates #567
This commit is contained in:
Cuong Manh Le 2020-07-17 23:11:27 +07:00 committed by GitHub
parent 25867501d4
commit 821f2e9000
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 44 additions and 4 deletions

10
cache/cache.go vendored
View file

@ -78,7 +78,15 @@ func New(opts config.Options) (*Cache, error) {
userServer := NewUserServer(localGRPCServer, dataBrokerClient)
userClient := user.NewUserServiceClient(localGRPCConnection)
manager := manager.New(authenticator, directoryProvider, sessionClient, userClient, dataBrokerClient)
manager := manager.New(
authenticator,
directoryProvider,
sessionClient,
userClient,
dataBrokerClient,
manager.WithGroupRefreshInterval(opts.RefreshDirectoryInterval),
manager.WithGroupRefreshTimeout(opts.RefreshDirectoryTimeout),
)
return &Cache{
dataBrokerServer: dataBrokerServer,