Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NamespaceUUID = uuidlib.FromStringOrNil("85ce106e-0ccf-11e6-81fc-0cc47a0f7eea")
Functions ¶
func ManyColumnCSV ¶
func UUIDFromName ¶
Creates a deterministic UUID from a given name. Names are easier to remember than UUIDs, so this should make writing scripts easier
Types ¶
type BrokerConnection ¶
type BrokerConnection struct { // Handling the connection to the local broker // the IP:Port of the local broker we talk to BrokerAddrStr string BrokerAddress *net.TCPAddr // the IP:Port of the coordinator that we fall back to CoordinatorAddress *net.TCPAddr // signals on this channel when it is done Stop chan bool // contains filtered or unexported fields }
func (*BrokerConnection) Start ¶
func (bc *BrokerConnection) Start()
func (*BrokerConnection) StopIn ¶
func (bc *BrokerConnection) StopIn(d time.Duration)
after the duration expires, stop the client by signalling on c.Stop
type Client ¶
type Client struct { BrokerConnection // unique client identifier ID common.UUID // contains filtered or unexported fields }
func (*Client) AttachDiffHandler ¶
func (c *Client) AttachDiffHandler(f func(m *common.SubscriptionDiffMessage))
func (*Client) AttachPublishHandler ¶
func (c *Client) AttachPublishHandler(f func(m *common.PublishMessage))
This function is called whenever the client receives a published message
type Config ¶
type Config struct { // ip:port of the initial, local broker BrokerAddress string // ip:port of the coordinator CoordinatorAddress string }
configuration for a client
type Publisher ¶
type Publisher struct { BrokerConnection ID common.UUID // contains filtered or unexported fields }
func NewPublisher ¶
func NewPublisher(id common.UUID, publishLoop func(*Publisher), cfg *Config) (p *Publisher, err error)
publishLoop should be a loop which will start whenever a connection to a broker is established; it should exit whenever an error is encountered and it will be restarted once a reconnection is reestablished
func (*Publisher) AddMetadata ¶
func (*Publisher) GetStats ¶
func (p *Publisher) GetStats() PublisherStats
type PublisherStats ¶
type SimulatedBroker ¶
type SimulatedBroker struct { // the IP:Port of the coordinator that we talk to CoordinatorAddress *net.TCPAddr // signals on this channel when it is done Stop chan bool // contains filtered or unexported fields }
func NewSimulatedBroker ¶
func NewSimulatedBroker(connectCallback func(*SimulatedBroker), errorCallback func(), msgHandler func(common.Sendable), id common.UUID, coordAddr string) (sb *SimulatedBroker, err error)
func (*SimulatedBroker) Start ¶
func (bc *SimulatedBroker) Start()
func (*SimulatedBroker) StopIn ¶
func (bc *SimulatedBroker) StopIn(d time.Duration)
after the duration expires, stop the client by signalling on c.Stop
Source Files ¶
Click to show internal directories.
Click to hide internal directories.