Skip to content

Commit

Permalink
doc: Partitions
Browse files Browse the repository at this point in the history
Signed-off-by: Vigith Maurice <[email protected]>
  • Loading branch information
vigith authored Dec 8, 2023
1 parent 3d4d170 commit 65b247f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/sourcer/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ type Sourcer interface {
// When the return value is negative, it indicates the pending information is not available.
// With pending information being not available, the Numaflow platform doesn't auto-scale the source.
Pending(ctx context.Context) int64
//Partitions returns the partitions associated with the source, will be used by the platform to determine
// Partitions returns the partitions associated with the source, will be used by the platform to determine
// the partitions to which the watermark should be published. If the source doesn't have partitions,
// DefaultPartitions() can be used to return the default partitions.
// In most cases, the DefaultPartitions() should be enough; the cases where we need to implement custom Partitions()
// is in a case like Kafka, where a reader can read from multiple Kafka partitions.
Partitions(ctx context.Context) []int32
}

Expand Down

0 comments on commit 65b247f

Please sign in to comment.