func GT(m interface{}, value interface{}) (Predicate, error) {
	switch mapper := m.(type) {
	case RequestToInt:
		return intGT(mapper, value)
	case RequestToFloat64:
		return float64GT(mapper, value)
	}
	return nil, fmt.Errorf("unsupported argument: %T", m)
}
GT returns predicate that tests that value of the mapper function is greater than the constant
package threshold
import (
	"fmt"
	"github.com/mailgun/vulcan/request"
)
type Predicate func(request.Request) bool
type RequestToString func(req request.Request) string
type RequestToInt func(req request.Request) int
type RequestToFloat64 func(req request.Request) float64
func RequestMethod() RequestToString {
	return func(r request.Request) string {
		return r.GetHttpRequest().Method
	}
}
func Attempts() RequestToInt {
	return func(r request.Request) int {
		return len(r.GetAttempts())
	}
}
func ResponseCode() RequestToInt {
	return func(r request.Request) int {
		attempts := len(r.GetAttempts())
		if attempts == 0 {
			return 0
		}
		lastResponse := r.GetAttempts()[attempts-1].GetResponse()
		if lastResponse == nil {
			return 0
		}
		return lastResponse.StatusCode
	}
}
func IsNetworkError() Predicate {
	return func(r request.Request) bool {
		attempts := len(r.GetAttempts())
		return attempts != 0 && r.GetAttempts()[attempts-1].GetError() != nil
	}
}
func AND(fns ...Predicate) Predicate {
	return func(req request.Request) bool {
		for _, fn := range fns {
			if !fn(req) {
				return false
			}
		}
		return true
	}
}
func OR(fns ...Predicate) Predicate {
	return func(req request.Request) bool {
		for _, fn := range fns {
			if fn(req) {
				return true
			}
		}
		return false
	}
}
func NOT(p Predicate) Predicate {
	return func(r request.Request) bool {
		return !p(r)
	}
}
func EQ(m interface{}, value interface{}) (Predicate, error) {
	switch mapper := m.(type) {
	case RequestToString:
		return stringEQ(mapper, value)
	case RequestToInt:
		return intEQ(mapper, value)
	}
	return nil, fmt.Errorf("unsupported argument: %T", m)
}
func NEQ(m interface{}, value interface{}) (Predicate, error) {
	p, err := EQ(m, value)
	if err != nil {
		return nil, err
	}
	return NOT(p), nil
}
func LT(m interface{}, value interface{}) (Predicate, error) {
	switch mapper := m.(type) {
	case RequestToInt:
		return intLT(mapper, value)
	case RequestToFloat64:
		return float64LT(mapper, value)
	}
	return nil, fmt.Errorf("unsupported argument: %T", m)
}