module Log.Backend.ElasticSearch.V1.Internal
(ElasticSearchConfig(..)
,defaultElasticSearchConfig
,EsUsername(..)
,EsPassword(..))
where
import Database.V1.Bloodhound hiding (Status)
import Prelude
import qualified Data.Text as T
data ElasticSearchConfig = ElasticSearchConfig {
esServer :: !T.Text
, esIndex :: !T.Text
, esShardCount :: !Int
, esReplicaCount :: !Int
, esMapping :: !T.Text
, esLogin :: Maybe (EsUsername, EsPassword)
, esLoginInsecure :: !Bool
} deriving (Eq, Show)
defaultElasticSearchConfig :: ElasticSearchConfig
defaultElasticSearchConfig = ElasticSearchConfig {
esServer = "http://localhost:9200",
esIndex = "logs",
esShardCount = 4,
esReplicaCount = 1,
esMapping = "log",
esLogin = Nothing,
esLoginInsecure = False
}