Documentation
¶
Index ¶
- type Mongo
- func (m *Mongo) Checker(ctx context.Context, state *healthcheck.CheckState) error
- func (m *Mongo) Close(ctx context.Context) error
- func (m *Mongo) GetCacheTime(ctx context.Context, id string) (*models.CacheTime, error)
- func (m *Mongo) IsConnected(ctx context.Context) bool
- func (m *Mongo) UpsertCacheTime(ctx context.Context, cacheTime *models.CacheTime) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mongo ¶
type Mongo struct {
mongoDriver.MongoDriverConfig
Connection *mongoDriver.MongoConnection
// contains filtered or unexported fields
}
func NewMongoStore ¶
NewMongoStore creates a connection to mongo database
func (*Mongo) Checker ¶
func (m *Mongo) Checker(ctx context.Context, state *healthcheck.CheckState) error
Checker is called by the healthcheck library to check the health state of this mongoDB instance
func (*Mongo) GetCacheTime ¶
GetCacheTime returns a cache time with its given id
func (*Mongo) IsConnected ¶
IsConnected return the connection status to the db
Click to show internal directories.
Click to hide internal directories.