This repository has been archived on 2022-09-10. You can view files and clone it, but cannot push or open issues or pull requests.
tunnel/types.go
2022-09-09 11:53:46 +00:00

26 lines
351 B
Go

package tunnel
import "github.com/google/uuid"
type ID string
func NewID() ID {
return ID(uuid.NewString())
}
type Type uint8
func (t Type) String() string {
switch t {
case TypeNormal:
return "normal"
case TypeRequest:
return "request"
case TypeConnected:
return "connected"
case TypeClosed:
return "closed"
}
return "invalid"
}