Documentation ¶
Index ¶
- func GetTimeRangeFilter(from string, to string) (bson.M, error)
- func GetTimeRangeFilterWithPatientUID(patientUID string, from string, to string) (bson.M, error)
- func GetUIDFilter(uid string) (bson.M, error)
- func LoadConfig(filePath *string) map[string]MongoConfig
- type MongoConfig
- type MongoConnectionPool
- type MongoDBServer
- type MongoLogData
- type MongoService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
func LoadConfig(filePath *string) map[string]MongoConfig
Types ¶
type MongoConfig ¶
type MongoConnectionPool ¶
type MongoConnectionPool struct { InputChannel chan MongoLogData // contains filtered or unexported fields }
func NewMongoConnectionPool ¶
func NewMongoConnectionPool(conf MongoConfig) *MongoConnectionPool
func (*MongoConnectionPool) Run ¶
func (s *MongoConnectionPool) Run()
func (*MongoConnectionPool) Terminate ¶
func (s *MongoConnectionPool) Terminate()
type MongoDBServer ¶
type MongoDBServer struct { PoolIdx int Hostname string Port int User string Password string Uri string Client *mongo.Client LogDataChannel (chan MongoLogData) }
func NewMongoDBServer ¶
func NewMongoDBServer(poolIdx int, conf MongoConfig) *MongoDBServer
func (*MongoDBServer) Disconnect ¶
func (mongodb *MongoDBServer) Disconnect(client *mongo.Client)
Disconnect DB
func (*MongoDBServer) InsertOne ¶
func (mongodb *MongoDBServer) InsertOne(data *MongoLogData) error
type MongoLogData ¶
type MongoService ¶
type MongoService struct { MongoDbConfigs map[string]MongoConfig // contains filtered or unexported fields }
func New ¶
func New(configFilePath *string) *MongoService
func (*MongoService) GetInputChannel ¶
func (s *MongoService) GetInputChannel(hostnickname string) (chan MongoLogData, error)
func (*MongoService) Init ¶
func (s *MongoService) Init(configFilePath *string)
func (*MongoService) PutData ¶
func (s *MongoService) PutData(data *MongoLogData) error
Click to show internal directories.
Click to hide internal directories.