Skip to content

Commit

Permalink
modify control signal
Browse files Browse the repository at this point in the history
  • Loading branch information
DX990307 committed Jun 20, 2024
1 parent f0d2196 commit 14ba5f4
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions mem/mem/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,16 +462,6 @@ func (b ControlMsgBuilder) WithDrain(flag bool) ControlMsgBuilder {
return b
}

func (b ControlMsgBuilder) WithValid(flag bool) ControlMsgBuilder {
b.valid = flag
return b
}

func (b ControlMsgBuilder) WithInvalid(flag bool) ControlMsgBuilder {
b.valid = flag
return b
}

func (b ControlMsgBuilder) WithEnable(flag bool) ControlMsgBuilder {
b.enable = flag
return b
Expand All @@ -496,10 +486,6 @@ func (b *ControlMsgBuilder) checkconflits() {
if b.disable == b.enable {
panic("cannot set enable and disable with the same value")
}

if b.valid == b.invalid {
panic("cannot set valid and invalid with the same value")
}
}

// Build creates a new ControlMsg.
Expand All @@ -517,8 +503,6 @@ func (b ControlMsgBuilder) Build() *ControlMsg {
m.NotifyDone = b.notifyDone
m.Pause = b.pause
m.Drain = b.drain
m.Valid = b.valid
m.Invalid = b.invalid
m.Enable = b.enable
m.Disable = b.disable
m.Reset = b.reset
Expand Down

0 comments on commit 14ba5f4

Please sign in to comment.