mirror of
https://github.com/fatedier/frp.git
synced 2025-01-09 06:47:07 +07:00
29 lines
409 B
Go
29 lines
409 B
Go
|
package client
|
||
|
|
||
|
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
|
||
|
}
|