This commit is contained in:
2022-03-17 15:54:23 +08:00
commit 437c38533d
25 changed files with 6943 additions and 0 deletions

35
action.go Normal file
View File

@@ -0,0 +1,35 @@
package imparse
import "context"
type Channel int
const (
Undefined Channel = 0
UniCast Channel = 1
GroupCast Channel = 2
)
var ChannelTypeName = map[Channel]string{
Undefined: "Undefined",
UniCast: "UniCast",
GroupCast: "GroupCast",
}
func (ch Channel) String() string {
return ChannelTypeName[ch]
}
type Answer interface {
Check(context.Context, Checker, Frame) error
Filter(context.Context, Frame) (uint64, error)
Transport(context.Context, Frame) error
Ack(context.Context, Frame) (int64, error)
}
type Pusher interface {
}
type Storage interface {
SaveMsg(context.Context, Frame) error
}