-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: no operation watermark progressor (#90)
Signed-off-by: Derek Wang <[email protected]>
- Loading branch information
Showing
3 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package generic | ||
|
||
import ( | ||
"github.com/numaproj/numaflow/pkg/isb" | ||
"github.com/numaproj/numaflow/pkg/watermark/fetch" | ||
"github.com/numaproj/numaflow/pkg/watermark/processor" | ||
"github.com/numaproj/numaflow/pkg/watermark/publish" | ||
) | ||
|
||
// NoOpWMProgressor is a no-op watermark progressor. As the name suggests, it does not do anything, no watermark is | ||
// progressed. | ||
type NoOpWMProgressor struct { | ||
} | ||
|
||
var _ fetch.Fetcher = (*NoOpWMProgressor)(nil) | ||
var _ publish.Publisher = (*NoOpWMProgressor)(nil) | ||
|
||
// NewNoOpWMProgressor returns NoOpWMProgressor. | ||
func NewNoOpWMProgressor() *NoOpWMProgressor { | ||
return &NoOpWMProgressor{} | ||
} | ||
|
||
// GetWatermark returns the default watermark. | ||
func (n NoOpWMProgressor) GetWatermark(_ isb.Offset) processor.Watermark { | ||
return processor.Watermark{} | ||
} | ||
|
||
// PublishWatermark does a no-op publish. | ||
func (n NoOpWMProgressor) PublishWatermark(_ processor.Watermark, _ isb.Offset) { | ||
} | ||
|
||
// GetLatestWatermark returns the default watermark as the latest watermark. | ||
func (n NoOpWMProgressor) GetLatestWatermark() processor.Watermark { | ||
return processor.Watermark{} | ||
} | ||
|
||
// StopPublisher stops the no-op publisher. | ||
func (n NoOpWMProgressor) StopPublisher() { | ||
} |