changestreamopt

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeStream

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

ChangeStream represents all passable params for the changeStream() function.

type ChangeStreamBundle

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

ChangeStreamBundle is a bundle of ChangeStream options

func BundleChangeStream

func BundleChangeStream(opts ...ChangeStream) *ChangeStreamBundle

BundleChangeStream bundles ChangeStream options.

func (*ChangeStreamBundle) BatchSize

func (csb *ChangeStreamBundle) BatchSize(i int32) *ChangeStreamBundle

BatchSize specifies the number of documents to return in a batch.

func (*ChangeStreamBundle) Collation

Collation adds an option to specify a collation.

func (*ChangeStreamBundle) ConvertChangeStreamOption

func (csb *ChangeStreamBundle) ConvertChangeStreamOption() option.ChangeStreamOptioner

ConvertChangeStreamOption implements the ChangeStream interface.

func (*ChangeStreamBundle) FullDocument

FullDocument specifies if a copy of the whole document should be returned.

func (*ChangeStreamBundle) MaxAwaitTime

func (csb *ChangeStreamBundle) MaxAwaitTime(d time.Duration) *ChangeStreamBundle

MaxAwaitTime specifies the maximum amount of time for the server to wait on new documents.

func (*ChangeStreamBundle) ResumeAfter

func (csb *ChangeStreamBundle) ResumeAfter(d *bson.Document) *ChangeStreamBundle

ResumeAfter specifies whether the change stream should be resumed after stopping.

func (*ChangeStreamBundle) String

func (csb *ChangeStreamBundle) String() string

String implements the Stringer interface

func (*ChangeStreamBundle) Unbundle

func (csb *ChangeStreamBundle) Unbundle(deduplicate bool) ([]option.ChangeStreamOptioner, *session.Client, error)

Unbundle transforms a bundle into a slice of options, optionally deduplicating

type ChangeStreamOption added in v0.0.10

type ChangeStreamOption interface {
	ChangeStream
	ConvertChangeStreamOption() option.ChangeStreamOptioner
}

ChangeStreamOption represents the options for the changeStream() function.

type ChangeStreamSession added in v0.0.10

type ChangeStreamSession interface {
	ChangeStream
	ConvertChangeStreamSession() *session.Client
}

ChangeStreamSession is the session for the changeStream() function

type ChangeStreamSessionOpt added in v0.0.10

type ChangeStreamSessionOpt struct{}

ChangeStreamSessionOpt is an count session option.

func (ChangeStreamSessionOpt) ConvertChangeStreamSession added in v0.0.10

func (ChangeStreamSessionOpt) ConvertChangeStreamSession() *session.Client

ConvertChangeStreamSession implements the ChangeStreamSession interface.

type OptBatchSize

type OptBatchSize option.OptBatchSize

OptBatchSize specifies the number of documents to return in each batch.

func BatchSize

func BatchSize(i int32) OptBatchSize

BatchSize specifies the number of documents to return in each batch.

func (OptBatchSize) ConvertChangeStreamOption

func (opt OptBatchSize) ConvertChangeStreamOption() option.ChangeStreamOptioner

ConvertChangeStreamOption implements the ChangeStream interface

type OptCollation

type OptCollation option.OptCollation

OptCollation specifies a collation.

func Collation

func Collation(c *mongoopt.Collation) OptCollation

Collation specifies a collation.

func (OptCollation) ConvertChangeStreamOption

func (opt OptCollation) ConvertChangeStreamOption() option.ChangeStreamOptioner

ConvertChangeStreamOption implements the ChangeStream interface.

type OptFullDocument

type OptFullDocument option.OptFullDocument

OptFullDocument specifies whether a copy of the whole document should be returned.

func FullDocument

func FullDocument(fd mongoopt.FullDocument) OptFullDocument

FullDocument specifies whether a copy of the whole document should be returned.

func (OptFullDocument) ConvertChangeStreamOption

func (opt OptFullDocument) ConvertChangeStreamOption() option.ChangeStreamOptioner

ConvertChangeStreamOption implements the ChangeStream interface.

type OptMaxAwaitTime

type OptMaxAwaitTime option.OptMaxAwaitTime

OptMaxAwaitTime specifies the max amount of time for the server to wait on new documents.

func MaxAwaitTime

func MaxAwaitTime(d time.Duration) OptMaxAwaitTime

MaxAwaitTime specifies the max amount of time for the server to wait on new documents.

func (OptMaxAwaitTime) ConvertChangeStreamOption

func (opt OptMaxAwaitTime) ConvertChangeStreamOption() option.ChangeStreamOptioner

ConvertChangeStreamOption implements the ChangeStream interface.

type OptResumeAfter

type OptResumeAfter option.OptResumeAfter

OptResumeAfter specifies if the stream should be resumed after stopping.

func ResumeAfter

func ResumeAfter(d *bson.Document) OptResumeAfter

ResumeAfter specifies if a change stream should be resumed after stopping.

func (OptResumeAfter) ConvertChangeStreamOption

func (opt OptResumeAfter) ConvertChangeStreamOption() option.ChangeStreamOptioner

ConvertChangeStreamOption implements the ChangeStream interface.

Jump to

Keyboard shortcuts

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