How to use the postal.publish function in postal

To help you get started, we’ve selected a few postal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github storyteller / Storyteller / client / lib / presentation / editor-presenter.js View on Github external
function applyOutstandingChanges(){
  // If any thing is open, pack it in now
  Postal.publish({
    channel: 'editor',
    topic: 'apply-changes',
    data: {}
  });
}
github storyteller / Storyteller / client / component-tests / test-queue-count.jsx View on Github external
function publishEngineMessage(topic, data){
	Postal.publish({
		channel: 'engine',
		topic: topic,
		data: data
	});
}
github storyteller / Storyteller / client / component-tests / old / test-spec-explorer.jsx View on Github external
function publishResults(){
	for (var id in AllSpecData.results){
		var completed = AllSpecData.results[id];


		Postal.publish({
			channel: 'engine',
			topic: completed.type,
			data: completed
		});

	}
}
github storyteller / Storyteller / client / lib-tests / test-hierarchy-data-store.js View on Github external
function changeLifecyleFilter(value){
  Postal.publish({
    channel: 'explorer',
    topic: 'lifecycle-filter-changed',
    data: {lifecycle: value}
  });
}
github B1naryStudio / CodeDoc / app / menu / actions.js View on Github external
onNewProjectComments(){
		postal.publish({
			channel: "topMenu",
			topic: "NewProjectComments"
		});
	};
github postaljs / postal.federation / src / handlers.js View on Github external
"federation.pong": function( data ) {
		data.source.handshakeComplete = true;
		data.source.setInstanceId( data.packingSlip.instanceId );
		if ( data.source.pings[data.packingSlip.pingData.ticket] ) {
			data.source.pings[data.packingSlip.pingData.ticket].callback( {
				ticket: data.packingSlip.pingData.ticket,
				instanceId: data.packingSlip.instanceId,
				source: data.source
			} );
			data.source.pings[data.packingSlip.pingData.ticket] = undefined;
		}
		if ( !_.contains( state._clients, data.packingSlip.instanceId ) ) {
			state._clients.push( data.packingSlip.instanceId );
		}
		postal.publish( {
			channel: "postal.federation",
			topic: "client.federated",
			data: {
				remoteId: data.source.instanceId,
				localId: postal.instanceId(),
				transport: data.transport
			}
		} );
	},
	"federation.disconnect": function( data ) {
github storyteller / Storyteller / client / lib / presentation / editor-presenter.js View on Github external
applyChange(data){
    this.spec.apply(data);
    this.refreshEditor();

    Postal.publish({
      channel: 'editor',
      topic: 'spec-edited',
      data: {}
    });
  }
github Hitachi-Automotive-And-Industry-Lab / semantic-segmentation-editor / imports / common / SseMsg.js View on Github external
obj.sendMsg = (function (name, argument) {
            postal.publish({
                channel: "ui",
                topic: "msg",
                data: {
                    name: name,
                    argument: argument
                }
            });
        }).bind(obj);
github postaljs / postal.federation / lib / node / postal.federation.js View on Github external
onFederatedMsg: function(payload) {
    postal.publish(payload.envelope);
  },

postal

Pub/Sub library providing wildcard subscriptions, complex message handling, etc. Works server and client-side.

MIT
Latest version published 3 years ago

Package Health Score

59 / 100
Full package analysis