mongo

package module
v0.0.0-...-03e3a7c Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

README

xk6-mongo

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongo

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

Mongo represents an instance of the JS module

func (*Mongo) Exports

func (m *Mongo) Exports() modules.Exports

func (*Mongo) Insert

func (*Mongo) Insert(c *mongo.Client, database string, collection string, doc map[string]string) error

func (*Mongo) XClient

func (m *Mongo) XClient(connURI string) (*mongo.Client, error)

XClient represents the Client constructor (i.e. `new mongo.Client()`) and returns a new mongo.Client reference. connURI -> mongodb://username:password@address:port/db?connect=direct

type RootModule

type RootModule struct{}

RootModule is the global module instance that will create module instances for each VU

func (*RootModule) NewModuleInstance

func (m *RootModule) NewModuleInstance(vu modules.VU) modules.Instance

NewModuleInstance implements the modules.Module interface returning a new instance for each VU.

Jump to

Keyboard shortcuts

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