protofsm: add String() method to ProtocolState

This commit is contained in:
Olaoluwa Osuntokun committed 2025-03-18 11:44:20 -05:00
1 parent 01382f4c2a
commit 1d2c22d140
3 files changed
+65 -3

No files matched your search

+8
View File
@@ -51,6 +51,10 @@ type dummyStateStart struct {
canSend *atomic.Bool
}
func (d *dummyStateStart) String() string {
return "dummyStateStart"
}
var (
hexDecode = func(keyStr string) []byte {
keyBytes, _ := hex.DecodeString(keyStr)
@@ -134,6 +138,10 @@ func (d *dummyStateStart) IsTerminal() bool {
type dummyStateFin struct {
}
func (d *dummyStateFin) String() string {
return "dummyStateFin"
}
func (d *dummyStateFin) ProcessEvent(event dummyEvents, env *dummyEnv,
) (*StateTransition[dummyEvents, *dummyEnv], error) {