Documentation
¶
Overview ¶
Package mongo is the MongoDB driver: mongodump --archive | mongorestore --archive, both run inside the local mongo container towards any pair of endpoints.
Index ¶
- type Driver
- func (*Driver) Address(ep driver.Endpoint) string
- func (*Driver) Configured(ep driver.Endpoint) bool
- func (*Driver) Databases(ctx context.Context, ep driver.Endpoint) ([]string, error)
- func (*Driver) Fields() []driver.Field
- func (*Driver) Local() driver.Local
- func (*Driver) Name() string
- func (*Driver) Objects(ctx context.Context, ep driver.Endpoint, db string) ([]driver.Object, error)
- func (*Driver) Permanent(line string) bool
- func (d *Driver) Plan(ctx context.Context, src, dst driver.Endpoint, db string, workers int, ...) (driver.Plan, error)
- func (*Driver) Prepare(ctx context.Context, dst driver.Endpoint, db string, fresh bool) error
- func (*Driver) StageFromLog(line string) string
- func (*Driver) StageFromStream([]byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct{}
func (*Driver) Address ¶ added in v0.2.0
Address is the host list of the URI, credentials and options left out.
func (*Driver) Permanent ¶ added in v0.2.0
Permanent matches errors no retry can fix: authentication and authorization failures.
func (*Driver) Plan ¶
func (d *Driver) Plan(ctx context.Context, src, dst driver.Endpoint, db string, workers int, only []string) (driver.Plan, error)
Plan gives every collection of at least splitSize its own stream and bundles the rest (small collections and views) into one more, which excludes everything that is either streamed on its own or not selected. If the collections cannot be listed, the whole database goes as a single stream.
func (*Driver) Prepare ¶
Prepare only acts with fresh: mongorestore creates the database on first insert.