init
This commit is contained in:
35
action.go
Normal file
35
action.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user