mirror of https://github.com/fatedier/frp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
408 B
29 lines
408 B
6 years ago
|
package event
|
||
6 years ago
|
|
||
|
import (
|
||
|
"errors"
|
||
|
|
||
|
"github.com/fatedier/frp/models/msg"
|
||
|
)
|
||
|
|
||
|
type EventType int
|
||
|
|
||
|
const (
|
||
|
EvStartProxy EventType = iota
|
||
|
EvCloseProxy
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
ErrPayloadType = errors.New("error payload type")
|
||
|
)
|
||
|
|
||
|
type EventHandler func(evType EventType, payload interface{}) error
|
||
|
|
||
|
type StartProxyPayload struct {
|
||
|
NewProxyMsg *msg.NewProxy
|
||
|
}
|
||
|
|
||
|
type CloseProxyPayload struct {
|
||
|
CloseProxyMsg *msg.CloseProxy
|
||
|
}
|