struct.go 856 B

1234567891011121314151617181920212223242526272829303132333435
  1. package core
  2. import (
  3. "errors"
  4. )
  5. type Stage uint8
  6. // These constants are meant to describe the stage in which the plugin is running.
  7. const (
  8. STAGE_START Stage = iota
  9. STAGE_END
  10. STAGE_RUN
  11. PROXY_CONNECTION_TYPE = "proxy_target_type"
  12. PROXY_CONNECTION_ADDR = "proxy_target_addr"
  13. PROXY_CONNECTION_PORT = "proxy_target_port"
  14. CLIENT_CONNECTION = "clientConn"
  15. BRIDGE = "bridge"
  16. CLIENT_ID = "client_id"
  17. )
  18. type ConfigLevel uint8
  19. const (
  20. CONFIG_LEVEL_CLIENT ConfigLevel = iota
  21. CONFIG_LEVEL_PLUGIN
  22. CONFIG_LEVEL_GLOBAL
  23. )
  24. var (
  25. CLIENT_CONNECTION_NOT_EXIST = errors.New("the client connection is not exist")
  26. BRIDGE_NOT_EXIST = errors.New("the bridge is not exist")
  27. REQUEST_EOF = errors.New("the request has finished")
  28. CLIENT_ID_NOT_EXIST = errors.New("the client id is not exist")
  29. )