Skip to content

Commit e52e2bc

Browse files
refact(cvr): add builder to initialize cvr zvolworkers and compression (#57)
Signed-off-by: prateekpandey14 <[email protected]>
1 parent 4ef7efa commit e52e2bc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pkg/apis/cstor/v1/cstorvolumebuilder.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,18 @@ func (cvr *CStorVolumeReplica) WithReplicaID(replicaID string) *CStorVolumeRepli
606606
return cvr
607607
}
608608

609+
// WithZvolWorkers sets the zvolworkers with the provided arguments
610+
func (cvr *CStorVolumeReplica) WithZvolWorkers(zvolworker string) *CStorVolumeReplica {
611+
cvr.Spec.ZvolWorkers = zvolworker
612+
return cvr
613+
}
614+
615+
// WithCWithCompression sets the compression algorithm with the provided arguments
616+
func (cvr *CStorVolumeReplica) WithCompression(compression string) *CStorVolumeReplica {
617+
cvr.Spec.Compression = compression
618+
return cvr
619+
}
620+
609621
// WithStatusPhase sets the Status Phase of CStorVolumeReplica with provided
610622
//arguments
611623
func (cvr *CStorVolumeReplica) WithStatusPhase(phase CStorVolumeReplicaPhase) *CStorVolumeReplica {

0 commit comments

Comments
 (0)