...
Package agent
Overview ▹
Index ▹
func IsConsulServer ¶
func IsConsulServer(m serf.Member) (bool, *Server)
IsConsulServer returns true if a serf member is a consul server agent. Returns a bool and a pointer to the Server.
type Key ¶
Key is used in maps and for equality tests. A key is based on endpoints.
type Key struct {
// contains filtered or unexported fields
}
func (*Key) Equal ¶
func (k *Key) Equal(x *Key) bool
Equal compares two Key objects
type Server ¶
Server is used to return details of a consul server
type Server struct {
Name string
ID string
Datacenter string
Port int
WanJoinPort int
Bootstrap bool
Expect int
Build version.Version
Version int
RaftVersion int
NonVoter bool
Addr net.Addr
Status serf.MemberStatus
// If true, use TLS when connecting to this server
UseTLS bool
}
func (*Server) Key ¶
func (s *Server) Key() *Key
Key returns the corresponding Key
func (*Server) String ¶
func (s *Server) String() string
String returns a string representation of Server