app

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2022 License: GPL-3.0 Imports: 15 Imported by: 4

Documentation

Overview

Package app wraps all other important packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GormLogger

type GormLogger struct{}

GormLogger ensures logging for db queries uses logrus

func (*GormLogger) Print

func (l *GormLogger) Print(values ...interface{})

Print ensures the db logs as default logrus

type MetadataContext

type MetadataContext struct {
	Db      *gorm.DB
	Watcher *fsnotify.Watcher

	MetadataRetrievalAgent agents.MetadataRetrievalAgent
	MetadataManager        *metadata.MetadataManager

	// Currently unused
	ExitChan chan bool
}

MetadataContext is a container for all important vars.

func NewDefaultMDContext

func NewDefaultMDContext() *MetadataContext

NewDefaultMDContext creates a new env with sane defaults.

func NewMDContext

func NewMDContext(
	databaseOptions db.DatabaseOptions,
	agent agents.MetadataRetrievalAgent) *MetadataContext

NewMDContext lets you create a more custom environment.

func NewTestingMDContext added in v0.3.0

func NewTestingMDContext(agent agents.MetadataRetrievalAgent) *MetadataContext

NewTestingMDContext creates a new MetadataContext for testing

func (*MetadataContext) Cleanup added in v0.1.2

func (m *MetadataContext) Cleanup()

Cleanup cleans up any running threads / processes for the context.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL