chore: change message type

This commit is contained in:
Noah Hsu
2022-08-14 03:05:30 +08:00
parent fe0dee1196
commit 8cd05275f0
4 changed files with 27 additions and 22 deletions

View File

@ -1,12 +1,17 @@
package message
type Message struct {
Type string `json:"type"`
Content interface{} `json:"content"`
}
type Messenger interface {
Send(interface{}) error
Send(Message) error
Receive() (string, error)
WaitSend(interface{}, int) error
WaitSend(Message, int) error
WaitReceive(int) (string, error)
}
func GetMessenger() Messenger {
return PostInstance
return HttpInstance
}