Documentation ¶
Index ¶
- type ChangeStream
- type ChangeStreamBundle
- func (csb *ChangeStreamBundle) BatchSize(i int32) *ChangeStreamBundle
- func (csb *ChangeStreamBundle) Collation(c *mongoopt.Collation) *ChangeStreamBundle
- func (csb *ChangeStreamBundle) ConvertChangeStreamOption() option.ChangeStreamOptioner
- func (csb *ChangeStreamBundle) FullDocument(fd mongoopt.FullDocument) *ChangeStreamBundle
- func (csb *ChangeStreamBundle) MaxAwaitTime(d time.Duration) *ChangeStreamBundle
- func (csb *ChangeStreamBundle) ResumeAfter(d *bson.Document) *ChangeStreamBundle
- func (csb *ChangeStreamBundle) String() string
- func (csb *ChangeStreamBundle) Unbundle(deduplicate bool) ([]option.ChangeStreamOptioner, *session.Client, error)
- type ChangeStreamOption
- type ChangeStreamSession
- type ChangeStreamSessionOpt
- type OptBatchSize
- type OptCollation
- type OptFullDocument
- type OptMaxAwaitTime
- type OptResumeAfter
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 ¶
func (csb *ChangeStreamBundle) Collation(c *mongoopt.Collation) *ChangeStreamBundle
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 ¶
func (csb *ChangeStreamBundle) FullDocument(fd mongoopt.FullDocument) *ChangeStreamBundle
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 ¶
type ChangeStreamOption interface { ChangeStream ConvertChangeStreamOption() option.ChangeStreamOptioner }
ChangeStreamOption represents the options for the changeStream() function.
type ChangeStreamSession ¶
type ChangeStreamSession interface { ChangeStream ConvertChangeStreamSession() *session.Client }
ChangeStreamSession is the session for the changeStream() function
type ChangeStreamSessionOpt ¶
type ChangeStreamSessionOpt struct{}
ChangeStreamSessionOpt is an count session option.
func (ChangeStreamSessionOpt) ConvertChangeStreamSession ¶
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.