mongodb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigKeys added in v1.0.0

func ConfigKeys() []string

ConfigKeys lists every mock-config key the plugin accepts (aliases included).

func DefaultPorts added in v1.0.0

func DefaultPorts() map[string]string

DefaultPorts returns the host port used for each port key when the config does not set it.

Types

type MongoDBConfig

type MongoDBConfig struct {
	Image         string `json:"image"`
	Port          string `json:"port"`
	Database      string `json:"database"`
	ContainerName string `json:"container-name"`
}

MongoDBConfig holds MongoDB-specific configuration

type MongoDBPlugin

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

MongoDBPlugin implements the ServicePlugin interface for MongoDB

func NewMongoDBPlugin

func NewMongoDBPlugin(dockerClient *docker.Client, logger *zap.Logger) *MongoDBPlugin

NewMongoDBPlugin creates a new MongoDB service plugin

func (*MongoDBPlugin) GetConnectionInfo

func (p *MongoDBPlugin) GetConnectionInfo() (*plugin.ConnectionInfo, error)

GetConnectionInfo returns connection details

func (*MongoDBPlugin) GetLogs

func (p *MongoDBPlugin) GetLogs(ctx context.Context, opts *plugin.LogOptions) ([]string, error)

GetLogs retrieves service logs

func (*MongoDBPlugin) IsReady

func (p *MongoDBPlugin) IsReady(ctx context.Context) (bool, error)

IsReady checks if the MongoDB service is ready to accept connections

func (*MongoDBPlugin) Launch

func (p *MongoDBPlugin) Launch(ctx context.Context, config map[string]interface{}) error

Launch starts the MongoDB service with given configuration

func (*MongoDBPlugin) Name

func (p *MongoDBPlugin) Name() string

Name returns the service identifier

func (*MongoDBPlugin) Stop

func (p *MongoDBPlugin) Stop(ctx context.Context) error

Stop terminates the MongoDB service

Jump to

Keyboard shortcuts

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