github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ccl/changefeedccl/testing_knobs.go (about)

     1  // Copyright 2018 The Cockroach Authors.
     2  //
     3  // Licensed as a CockroachDB Enterprise file under the Cockroach Community
     4  // License (the "License"); you may not use this file except in compliance with
     5  // the License. You may obtain a copy of the License at
     6  //
     7  //     https://github.com/cockroachdb/cockroach/blob/master/licenses/CCL.txt
     8  
     9  package changefeedccl
    10  
    11  import "context"
    12  
    13  // TestingKnobs are the testing knobs for changefeed.
    14  type TestingKnobs struct {
    15  	// BeforeEmitRow is called before every sink emit row operation.
    16  	BeforeEmitRow func(context.Context) error
    17  	// AfterSinkFlush is called after a sink flush operation has returned without
    18  	// error.
    19  	AfterSinkFlush func() error
    20  	// MemBufferCapacity, if non-zero, overrides memBufferDefaultCapacity.
    21  	MemBufferCapacity int64
    22  }
    23  
    24  // ModuleTestingKnobs is part of the base.ModuleTestingKnobs interface.
    25  func (*TestingKnobs) ModuleTestingKnobs() {}