httpbroadcast

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPBroadcastReceiver

type HTTPBroadcastReceiver struct {
	// contains filtered or unexported fields
}

HTTPBroadcastReceiver unmarshals incoming messages over HTTP and passes them on to the handler.

func NewHTTPBroadcastReceiver

func NewHTTPBroadcastReceiver(port string, logOutput io.Writer) *HTTPBroadcastReceiver

NewHTTPBroadcastReceiver returns a new instance of HTTPBroadcastReceiver.

func (*HTTPBroadcastReceiver) ServeHTTP

func (rec *HTTPBroadcastReceiver) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*HTTPBroadcastReceiver) Start

Start implements the BroadcastReceiver interface and starts listening for broadcast messages.

type HTTPBroadcaster

type HTTPBroadcaster struct {
	// contains filtered or unexported fields
}

HTTPBroadcaster represents a NodeSet that broadcasts messages over HTTP.

func NewHTTPBroadcaster

func NewHTTPBroadcaster(s *pilosa.Server, internalPort string) *HTTPBroadcaster

NewHTTPBroadcaster returns a new instance of HTTPBroadcaster.

func (*HTTPBroadcaster) SendAsync

func (h *HTTPBroadcaster) SendAsync(pb proto.Message) error

SendAsync exists to implement the Broadcaster interface, but just calls SendSync.

func (*HTTPBroadcaster) SendSync

func (h *HTTPBroadcaster) SendSync(pb proto.Message) error

SendSync sends a protobuf message to all nodes simultaneously. It waits for all nodes to respond before the function returns (and returns any errors).

type HTTPNodeSet

type HTTPNodeSet struct {
	// contains filtered or unexported fields
}

HTTPNodeSet represents a NodeSet that broadcasts messages over HTTP.

func NewHTTPNodeSet

func NewHTTPNodeSet() *HTTPNodeSet

NewHTTPNodeSet returns a new instance of HTTPNodeSet.

func (*HTTPNodeSet) Join

func (h *HTTPNodeSet) Join(nodes []*pilosa.Node) error

Join sets the NodeSet nodes to the slice of Nodes passed in.

func (*HTTPNodeSet) Nodes

func (h *HTTPNodeSet) Nodes() []*pilosa.Node

Nodes implements the NodeSet interface and returns a list of nodes in the cluster.

func (*HTTPNodeSet) Open

func (h *HTTPNodeSet) Open() error

Open implements the NodeSet interface to start network activity, but for a HTTPNodeSet it does nothing.

Jump to

Keyboard shortcuts

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