mirror of
https://gitee.com/IrisVega/frp.git
synced 2024-11-01 22:31:29 +08:00
29 lines
385 B
Go
29 lines
385 B
Go
package event
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/fatedier/frp/pkg/msg"
|
|
)
|
|
|
|
type Type int
|
|
|
|
const (
|
|
EvStartProxy Type = iota
|
|
EvCloseProxy
|
|
)
|
|
|
|
var (
|
|
ErrPayloadType = errors.New("error payload type")
|
|
)
|
|
|
|
type Handler func(evType Type, payload interface{}) error
|
|
|
|
type StartProxyPayload struct {
|
|
NewProxyMsg *msg.NewProxy
|
|
}
|
|
|
|
type CloseProxyPayload struct {
|
|
CloseProxyMsg *msg.CloseProxy
|
|
}
|