This section is empty.


This section is empty.


This section is empty.


type Surveyee

type Surveyee interface {
	OnSurvey(queryType string, request []byte) (response []byte, ok bool)

Surveyee handles the surveys.

type Surveyor

type Surveyor struct {
	// contains filtered or unexported fields

Surveyor represents a distributed surveyor.

func New

func New(p service.PubSub, g gossiper) *Surveyor

New creates a new distributed surveyor.

func (*Surveyor) HandleFunc

func (c *Surveyor) HandleFunc(surveyees ...Surveyee)

HandleFunc adds a handler for a query.

func (*Surveyor) ID

func (c *Surveyor) ID() string

ID returns the unique identifier of the subsriber.

func (*Surveyor) Query

func (c *Surveyor) Query(query string, payload []byte) (message.Awaiter, error)

Query issues a cluster-wide request.

func (*Surveyor) Send

func (c *Surveyor) Send(m *message.Message) error

Send occurs when we have received a message.

func (*Surveyor) Start

func (c *Surveyor) Start()

Start subscribes the manager to the query channel.

func (*Surveyor) Type

func (c *Surveyor) Type() message.SubscriberType

Type returns the type of the subscriber

Source Files