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