db

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MongoDBConnect

func MongoDBConnect(ctx context.Context, mongoCfg *config.MongoConfig, opts ...*options.ClientOptions) (*mongo.Client, error)

func MongoGateStream added in v0.1.3

func MongoGateStream(m *MongoReadiness, allowMethods ...string) grpc.StreamServerInterceptor

func MongoGateUnary added in v0.1.3

func MongoGateUnary(m *MongoReadiness, allowMethods ...string) grpc.UnaryServerInterceptor

Types

type MongoReadiness added in v0.1.3

type MongoReadiness struct {
	// contains filtered or unexported fields
}

func NewMongoReadiness added in v0.1.3

func NewMongoReadiness(client *mongo.Client, timeout time.Duration) *MongoReadiness

func (*MongoReadiness) CheckNow added in v0.1.3

func (m *MongoReadiness) CheckNow(ctx context.Context) error

func (*MongoReadiness) CloseGate added in v0.1.4

func (m *MongoReadiness) CloseGate(reason string)

func (*MongoReadiness) LastError added in v0.1.3

func (m *MongoReadiness) LastError() string

func (*MongoReadiness) OpenGate added in v0.1.4

func (m *MongoReadiness) OpenGate()

func (*MongoReadiness) Ready added in v0.1.3

func (m *MongoReadiness) Ready() bool

func (*MongoReadiness) Run added in v0.1.3

func (m *MongoReadiness) Run(ctx context.Context, interval time.Duration)

Jump to

Keyboard shortcuts

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