func (q *Query) Deadline() time.Time {
	return q.deadline
}
Deadline returns the time by which a response must be sent
package serf
import (
	"fmt"
	"net"
	"sync"
	"time"
)
type EventType int
const (
	EventMemberJoin EventType = iota
	EventMemberLeave
	EventMemberFailed
	EventMemberUpdate
	EventMemberReap
	EventUser
	EventQuery
)
func (t EventType) String() string {
	switch t {
	case EventMemberJoin:
		return "member-join"
	case EventMemberLeave:
		return "member-leave"
	case EventMemberFailed:
		return "member-failed"
	case EventMemberUpdate:
		return "member-update"
	case EventMemberReap:
		return "member-reap"
	case EventUser:
		return "user"
	case EventQuery:
		return "query"
	default:
		panic(fmt.Sprintf("unknown event type: %d", t))
	}
}
type Event interface {
	EventType() EventType
	String() string
}
type MemberEvent struct {
	Type    EventType
	Members []Member
}
func (m MemberEvent) EventType() EventType {
	return m.Type
}
func (m MemberEvent) String() string {
	switch m.Type {
	case EventMemberJoin:
		return "member-join"
	case EventMemberLeave:
		return "member-leave"
	case EventMemberFailed:
		return "member-failed"
	case EventMemberUpdate:
		return "member-update"
	case EventMemberReap:
		return "member-reap"
	default:
		panic(fmt.Sprintf("unknown event type: %d", m.Type))
	}
}
type UserEvent struct {
	LTime    LamportTime
	Name     string
	Payload  []byte
	Coalesce bool
}
func (u UserEvent) EventType() EventType {
	return EventUser
}
func (u UserEvent) String() string {
	return fmt.Sprintf("user-event: %s", u.Name)
}
type Query struct {
	LTime   LamportTime
	Name    string
	Payload []byte
	serf     *Serf
	id       uint32     
	addr     []byte     
	port     uint16     
	deadline time.Time  
	respLock sync.Mutex
}
func (q *Query) EventType() EventType {
	return EventQuery
}
func (q *Query) String() string {
	return fmt.Sprintf("query: %s", q.Name)
}