You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: relay.go
    path of file: ./repos/plumber/backends/cdcmongo
    
    the code of the file until where you have to start completion: package cdcmongo

import (
	"context"
	"time"

	"github.com/pkg/errors"
	"go.mongodb.org/mongo-driver/mongo"
	"go.mongodb.org/mongo-driver/mongo/options"

	"github.com/batchcorp/plumber-schemas/build/go/protos/opts"
	"github.com/batchcorp/plumber-schemas/build/go/protos/records"

	"github.com/streamdal/plumber/backends/cdcmongo/types"
	"github.com/streamdal/plumber/prometheus"
	"github.com/streamdal/plumber/validate"
)

func (m *Mongo) Relay(ctx context.Context, relayOpts *opts.RelayOptions, relayCh chan interface{}, errorCh chan<- *records.ErrorRecord) error {
	if err := validateRelayOptions(relayOpts); err != nil {
		return errors.Wrap(
    
func (m *Mongo) getChangeStreamRelay(ctx context.Context, readOpts *opts.RelayOptions) (*mongo.ChangeStream, error) {
	var err error
	var cs *mongo.ChangeStream
	streamOpts := make([]*options.ChangeStreamOptions, 0)

	if readOpts.Mongo.Args.IncludeFullDocument {
		streamOpts = append(streamOpts, options.ChangeStream().SetFullDocument(options.UpdateLookup))
	}

	if readOpts.Mongo.Args.Database != "" {
		database := m.client.Database(readOpts.Mongo.Args.Database)
		if readOpts.Mongo.Args.Collection == "" {
			// Watch specific database and all collections under it
			cs, err = database.Watch(ctx, mongo.Pipeline{}, streamOpts...)
		} else {
			// Watch specific database and collection deployment
			coll := database.Collection(readOpts.Mongo.Args.Collection)
			cs, err = coll.Watch(ctx, mongo.Pipeline{}, streamOpts...)
		}
	} else {
		// Watch entire deployment
		cs, err = m.client.Watch(ctx, mongo.Pipeline{}, streamOpts...)
	}

	if err != nil {
		return nil, errors.Wrap(err, "could not begin change stream")
	}

	return cs, nil
}