Documentation
¶
Index ¶
Constants ¶
View Source
const AlwaysUseCacheKey = "always"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher interface { PreCache() error LogMetadata(bindingID string, revision int, promLabels prometheus.Labels) (*model.LogMetadata, error) }
type LogMetadataCached ¶
type LogMetadataCached struct { model.LogMetadata ExpireAt time.Time }
type MetaCacher ¶
type MetaCacher struct {
// contains filtered or unexported fields
}
func NewMetaCacher ¶
func NewMetaCacher(db *gorm.DB, cacheDuration string) (*MetaCacher, error)
func (*MetaCacher) Cleaner ¶
func (c *MetaCacher) Cleaner()
Cleaner - clean expired cache to ensure to not use too much memory This need to be called in a goroutine and do a kind of stop the world during cleaning sync map
func (*MetaCacher) LogMetadata ¶
func (c *MetaCacher) LogMetadata( bindingID string, revision int, promLabels prometheus.Labels, ) (*model.LogMetadata, error)
func (*MetaCacher) PreCache ¶
func (c *MetaCacher) PreCache() error
type Migration ¶
type Migration struct { ID string Migrate func(db *gorm.DB, config *model.Config) error Rollback func(db *gorm.DB, config *model.Config) error }
func GormMigration ¶
func GormMigration() []*Migration
type Migrations ¶
func (Migrations) ToGormMigrate ¶
func (m Migrations) ToGormMigrate() []*gormigrate.Migration
Click to show internal directories.
Click to hide internal directories.