mongodbretriever

package
v1.26.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Retriever

type Retriever struct {
	// MongoDB connection URI
	URI string
	// Mongodb database where flags collection is
	Database string
	// Mongodb collection where flag definitions are stored
	Collection string
	// contains filtered or unexported fields
}

Retriever is a configuration struct for a MongoDB connection and Collection.

func (*Retriever) Init

func (r *Retriever) Init(ctx context.Context, logger *log.Logger) error

func (*Retriever) Retrieve

func (r *Retriever) Retrieve(ctx context.Context) ([]byte, error)

Reads flag configuration from mongodb and returns it if a document does not comply with specification it will be ignored

func (*Retriever) Shutdown

func (r *Retriever) Shutdown(ctx context.Context) error

disconnects the retriever from Mongodb instance

func (*Retriever) Status

func (r *Retriever) Status() retriever.Status

returns the current status of the retriever

Jump to

Keyboard shortcuts

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