"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "services/brig/src/Brig/Options.hs" between
wire-server-2020-06-10.tar.gz and wire-server-2020-06-19.tar.gz

About: Wire (server) offers end-to-end encrypted messaging, file-sharing, video and voice calls, and guest rooms for external communication (back-end server).

Options.hs  (wire-server-2020-06-10):Options.hs  (wire-server-2020-06-19)
skipping to change at line 59 skipping to change at line 59
readsPrec i s = readsPrec i s =
case readsPrec i s of case readsPrec i s of
[(x :: Int, s')] -> [(Timeout (fromIntegral x), s')] [(x :: Int, s')] -> [(Timeout (fromIntegral x), s')]
_ -> [] _ -> []
data ElasticSearchOpts = ElasticSearchOpts data ElasticSearchOpts = ElasticSearchOpts
{ -- | ElasticSearch URL { -- | ElasticSearch URL
url :: !Text, url :: !Text,
-- | The name of the ElasticSearch user index -- | The name of the ElasticSearch user index
index :: !Text, index :: !Text,
-- | An additional index to write user data, useful while migrating to a new -- | An additional index to write user data, useful while migrating to a new
index -- index.
-- There is a bug hidden when using this option. Sometimes a user won't get
-- deleted from the index. Attempts at reproducing this issue in a simpler
-- environment have failed. As a workaround, there is a tool in
-- tools/db/find-undead which can be used to find the undead users right
-- after the migration, if they exist, we can run the reindexing to get data
-- in elasticsearch in a consistent state.
additionalWriteIndex :: !(Maybe Text) additionalWriteIndex :: !(Maybe Text)
} }
deriving (Show, Generic) deriving (Show, Generic)
instance FromJSON ElasticSearchOpts instance FromJSON ElasticSearchOpts
data AWSOpts = AWSOpts data AWSOpts = AWSOpts
{ -- | Event journal queue for user events { -- | Event journal queue for user events
-- (e.g. user deletion) -- (e.g. user deletion)
userJournalQueue :: !(Maybe Text), userJournalQueue :: !(Maybe Text),
skipping to change at line 332 skipping to change at line 339
data Opts = Opts data Opts = Opts
-- services -- services
{ -- | Host and port to bind to { -- | Host and port to bind to
brig :: !Endpoint, brig :: !Endpoint,
-- | Cargohold address -- | Cargohold address
cargohold :: !Endpoint, cargohold :: !Endpoint,
-- | Galley address -- | Galley address
galley :: !Endpoint, galley :: !Endpoint,
-- | Gundeck address -- | Gundeck address
gundeck :: !Endpoint, gundeck :: !Endpoint,
-- | Federator address
federator :: !(Maybe Endpoint),
-- external -- external
-- | Cassandra settings -- | Cassandra settings
cassandra :: !CassandraOpts, cassandra :: !CassandraOpts,
-- | ElasticSearch settings -- | ElasticSearch settings
elasticsearch :: !ElasticSearchOpts, elasticsearch :: !ElasticSearchOpts,
-- | AWS settings -- | AWS settings
aws :: !AWSOpts, aws :: !AWSOpts,
-- | STOMP broker settings -- | STOMP broker settings
stomp :: !(Maybe StompOpts), stomp :: !(Maybe StompOpts),
skipping to change at line 445 skipping to change at line 454
setEmailVisibility :: !EmailVisibility, setEmailVisibility :: !EmailVisibility,
setPropertyMaxKeyLen :: !(Maybe Int64), setPropertyMaxKeyLen :: !(Maybe Int64),
setPropertyMaxValueLen :: !(Maybe Int64), setPropertyMaxValueLen :: !(Maybe Int64),
-- | How long, in milliseconds, to wait -- | How long, in milliseconds, to wait
-- in between processing delete events -- in between processing delete events
-- from the internal delete queue -- from the internal delete queue
setDeleteThrottleMillis :: !(Maybe Int), setDeleteThrottleMillis :: !(Maybe Int),
-- | When true, search only -- | When true, search only
-- returns users from the same team -- returns users from the same team
setSearchSameTeamOnly :: !(Maybe Bool), setSearchSameTeamOnly :: !(Maybe Bool),
-- | When false, assume there are no other backends and IDs are always local . -- | When @Nothing@, assume there are no other backends and IDs are always l ocal.
-- This means we don't run any queries on federation-related tables and don' t -- This means we don't run any queries on federation-related tables and don' t
-- make any calls to the federator service. -- make any calls to the federator service.
setEnableFederation :: !(Maybe Bool), setEnableFederationWithDomain :: !(Maybe Domain),
-- | The amount of time in milliseconds to wait after reading from an SQS qu eue -- | The amount of time in milliseconds to wait after reading from an SQS qu eue
-- returns no message, before asking for messages from SQS again. -- returns no message, before asking for messages from SQS again.
-- defaults to 'defSqsThrottleMillis'. -- defaults to 'defSqsThrottleMillis'.
-- When using real SQS from AWS, throttling isn't needed as much, since usin g -- When using real SQS from AWS, throttling isn't needed as much, since usin g
-- SQS.rmWaitTimeSeconds (Just 20) in Brig.AWS.listen -- SQS.rmWaitTimeSeconds (Just 20) in Brig.AWS.listen
-- ensures that there is only one request every 20 seconds. -- ensures that there is only one request every 20 seconds.
-- However, that parameter is not honoured when using fake-sqs -- However, that parameter is not honoured when using fake-sqs
-- (where throttling can thus make sense) -- (where throttling can thus make sense)
setSqsThrottleMillis :: !(Maybe Int), setSqsThrottleMillis :: !(Maybe Int),
-- Customer extensions -- Customer extensions
skipping to change at line 524 skipping to change at line 533
defDeleteThrottleMillis :: Int defDeleteThrottleMillis :: Int
defDeleteThrottleMillis = 100 defDeleteThrottleMillis = 100
defSqsThrottleMillis :: Int defSqsThrottleMillis :: Int
defSqsThrottleMillis = 500 defSqsThrottleMillis = 500
defUserMaxPermClients :: Int defUserMaxPermClients :: Int
defUserMaxPermClients = 7 defUserMaxPermClients = 7
defEnableFederation :: Bool
defEnableFederation = False
instance FromJSON Timeout where instance FromJSON Timeout where
parseJSON (Y.Number n) = parseJSON (Y.Number n) =
let defaultV = 3600 let defaultV = 3600
bounded = toBoundedInteger n :: Maybe Int64 bounded = toBoundedInteger n :: Maybe Int64
in pure in pure
$ Timeout $ Timeout
$ fromIntegral @Int $ fromIntegral @Int
$ maybe defaultV fromIntegral bounded $ maybe defaultV fromIntegral bounded
parseJSON v = typeMismatch "activationTimeout" v parseJSON v = typeMismatch "activationTimeout" v
skipping to change at line 554 skipping to change at line 560
("elasticsearch", "elasticsearchL") ("elasticsearch", "elasticsearchL")
] ]
''Opts ''Opts
Lens.makeLensesFor Lens.makeLensesFor
[ ("setEmailVisibility", "emailVisibility"), [ ("setEmailVisibility", "emailVisibility"),
("setPropertyMaxKeyLen", "propertyMaxKeyLen"), ("setPropertyMaxKeyLen", "propertyMaxKeyLen"),
("setPropertyMaxValueLen", "propertyMaxValueLen"), ("setPropertyMaxValueLen", "propertyMaxValueLen"),
("setSearchSameTeamOnly", "searchSameTeamOnly"), ("setSearchSameTeamOnly", "searchSameTeamOnly"),
("setUserMaxPermClients", "userMaxPermClients"), ("setUserMaxPermClients", "userMaxPermClients"),
("setEnableFederation", "enableFederation"), ("setEnableFederationWithDomain", "enableFederationWithDomain"),
("setSqsThrottleMillis", "sqsThrottleMillis") ("setSqsThrottleMillis", "sqsThrottleMillis")
] ]
''Settings ''Settings
Lens.makeLensesFor Lens.makeLensesFor
[ ("url", "urlL"), [ ("url", "urlL"),
("index", "indexL"), ("index", "indexL"),
("additionalWriteIndex", "additionalWriteIndexL") ("additionalWriteIndex", "additionalWriteIndexL")
] ]
''ElasticSearchOpts ''ElasticSearchOpts
 End of changes. 6 change blocks. 
8 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)