mongodbretriever

package
v1.31.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 7 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 *fflog.FFLogger) error

func (*Retriever) Retrieve

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

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

func (*Retriever) Shutdown

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

Shutdown disconnects the retriever from Mongodb instance

func (*Retriever) Status

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

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