mongo

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

type Mongo struct {
	config.MongoConfig

	Connection *mongodriver.MongoConnection
	// contains filtered or unexported fields
}

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) Close

func (m *Mongo) Close(ctx context.Context) error

Close represents mongo session closing within the context deadline

func (*Mongo) CreateEvent

func (m *Mongo) CreateEvent(ctx context.Context, event *domain.Event) error

func (*Mongo) CreateJob

func (m *Mongo) CreateJob(ctx context.Context, job *domain.Job) (*domain.Job, error)

func (*Mongo) GetJob

func (m *Mongo) GetJob(ctx context.Context, jobID string) (*domain.Job, error)

func (*Mongo) Init

func (m *Mongo) Init(ctx context.Context) (err error)

Init returns an initialised Mongo object encapsulating a connection to the mongo server/cluster with the given configuration, and a health client to check the health of the mongo server/cluster

Jump to

Keyboard shortcuts

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