base.go 444 B

1234567891011121314151617181920212223242526272829303132
  1. package common
  2. import (
  3. "errors"
  4. )
  5. var (
  6. errPayload = errors.New("payloadRule error")
  7. noResolve = "no-resolve"
  8. )
  9. type Base struct {
  10. }
  11. func (b *Base) ShouldFindProcess() bool {
  12. return false
  13. }
  14. func (b *Base) ShouldResolveIP() bool {
  15. return false
  16. }
  17. func (b *Base) ProviderNames() []string { return nil }
  18. func HasNoResolve(params []string) bool {
  19. for _, p := range params {
  20. if p == noResolve {
  21. return true
  22. }
  23. }
  24. return false
  25. }