github.com/cmd-stream/base-go@v0.0.0-20230813145615-dd6ac24c16f5/result.go (about) 1 package base 2 3 // Result represents a result of the cmd-stream command. 4 // 5 // All user-defined results should implement this interface. If the LastOne 6 // method returns false, the client will wait for other command results. 7 type Result interface { 8 LastOne() bool 9 } 10 11 // AsyncResult is an asynchronous result, where the Seq field is a sequence 12 // number of the command, Result field - a result itself, Error field - an 13 // error that occurred during command execution. 14 type AsyncResult struct { 15 Seq Seq 16 Result Result 17 Error error 18 }