func (k *Kite) PreHandleFunc(handler HandlerFunc) {
	k.PreHandle(handler)
}
PreHandleFunc is the same as PreHandle. It accepts a HandlerFunc.
package kite
import (
	"sync"
	"time"
	"github.com/juju/ratelimit"
)
type MethodHandling int
const (
	ReturnMethod MethodHandling = iota
	ReturnFirst
	ReturnLatest
)
type Handler interface {
	ServeKite(*Request) (result interface{}, err error)
}
type HandlerFunc func(*Request) (result interface{}, err error)
func (h HandlerFunc) ServeKite(r *Request) (interface{}, error) {
	return h(r)
}
type FinalFunc func(r *Request, resp interface{}, err error) (interface{}, error)
type Method struct {
	name string
	handler      Handler      
	preHandlers  []Handler    
	postHandlers []Handler    
	finalFuncs   []FinalFunc  
	authenticate bool
	handling MethodHandling
	initialized bool
	bucket *ratelimit.Bucket
	mu sync.Mutex  
}
func (k *Kite) addHandle(method string, handler Handler) *Method {
	authenticate := true
	if k.Config.DisableAuthentication {
		authenticate = false
	}
	m := &Method{
		name:         method,
		handler:      handler,
		authenticate: authenticate,
		handling:     k.MethodHandling,
	}
	k.handlers[method] = m
	return m
}
func (m *Method) DisableAuthentication() *Method {
	m.authenticate = false
	return m
}
func (m *Method) Throttle(fillInterval time.Duration, capacity int64) *Method {
	if m.bucket != nil {
		return m
	}
	m.bucket = ratelimit.NewBucket(
		fillInterval,  
		capacity,      
	)
	return m
}
func (m *Method) PreHandle(handler Handler) *Method {
	m.preHandlers = append(m.preHandlers, handler)
	return m
}
func (m *Method) PreHandleFunc(handler HandlerFunc) *Method {
	return m.PreHandle(handler)
}
func (m *Method) PostHandle(handler Handler) *Method {
	m.postHandlers = append(m.postHandlers, handler)
	return m
}
func (m *Method) PostHandleFunc(handler HandlerFunc) *Method {
	return m.PostHandle(handler)
}
func (m *Method) FinalFunc(f FinalFunc) *Method {
	m.finalFuncs = append(m.finalFuncs, f)
	return m
}
func (k *Kite) Handle(method string, handler Handler) *Method {
	return k.addHandle(method, handler)
}
func (k *Kite) HandleFunc(method string, handler HandlerFunc) *Method {
	return k.addHandle(method, handler)
}
func (k *Kite) PreHandle(handler Handler) {
	k.preHandlers = append(k.preHandlers, handler)
}