mongo-drivergo.mongodb.org/mongo-driver/mongo/runcmdopt Index | Files

package runcmdopt

import "go.mongodb.org/mongo-driver/mongo/runcmdopt"

Index

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option represents a RunCommand option.

func ReadPreference

func ReadPreference(rp *readpref.ReadPref) Option

ReadPreference sets the read preference.

type RunCmd

type RunCmd struct {
	ReadPreference *readpref.ReadPref
}

RunCmd represents a run command.

type RunCmdBundle

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

RunCmdBundle is a bundle of RunCommand options.

func BundleRunCmd

func BundleRunCmd(opts ...Option) *RunCmdBundle

BundleRunCmd bundles RunCommand options

func (*RunCmdBundle) ReadPreference

func (rcb *RunCmdBundle) ReadPreference(rp *readpref.ReadPref) *RunCmdBundle

ReadPreference sets the read preference.

func (*RunCmdBundle) String

func (rcb *RunCmdBundle) String() string

String implements the Stringer interface

func (*RunCmdBundle) Unbundle

func (rcb *RunCmdBundle) Unbundle() (*RunCmd, error)

Unbundle unbundles the options, returning a RunCmd instance.

Source Files

runcmdopt.go

Version
v0.0.9
Published
Jul 10, 2018
Platform
windows/amd64
Imports
2 packages
Last checked
3 minutes ago

Tools for package owners.