mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 23:24:01 +03:00
FILE / ScuroNeko/mtg
mtglib/events.go
Исходный файл и его история в репозитории.
43 lines
582 B
Go
43 lines
582 B
Go
package mtglib
|
|
|
|
import (
|
|
"net"
|
|
"time"
|
|
)
|
|
|
|
type EventStart struct {
|
|
CreatedAt time.Time
|
|
ConnID string
|
|
RemoteIP net.IP
|
|
}
|
|
|
|
func (e EventStart) StreamID() string {
|
|
return e.ConnID
|
|
}
|
|
|
|
type EventFinish struct {
|
|
CreatedAt time.Time
|
|
ConnID string
|
|
}
|
|
|
|
func (e EventFinish) StreamID() string {
|
|
return e.ConnID
|
|
}
|
|
|
|
type EventConcurrencyLimited struct {
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
func (e EventConcurrencyLimited) StreamID() string {
|
|
return ""
|
|
}
|
|
|
|
type EventIPBlocklisted struct {
|
|
CreatedAt time.Time
|
|
RemoteIP net.IP
|
|
}
|
|
|
|
func (e EventIPBlocklisted) StreamID() string {
|
|
return ""
|
|
}
|