Version: v0.7.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2016 License: MPL-2.0 Imports: 4 Imported by: 0



Package agent provides a logical endpoint for Consul agents in the network. agent data originates from Serf gossip and is primarily used to communicate Consul server information. Gossiped information that ends up in Server contains the necessary metadata required for servers.Manager to select which server an RPC request should be routed to.



This section is empty.


This section is empty.


This section is empty.


type Key

type Key struct {
	// contains filtered or unexported fields

Key is used in maps and for equality tests. A key is based on endpoints.

func (*Key) Equal

func (k *Key) Equal(x *Key) bool

Equal compares two Key objects

type Server

type Server struct {
	Name       string
	Datacenter string
	Port       int
	Bootstrap  bool
	Expect     int
	Version    int
	Addr       net.Addr

Server is used to return details of a consul server

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.

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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL