Http structured emitter
Types Impl. Signed-off-by: Fabio José <fabiojose@gmail.com>
This commit is contained in:
		
							parent
							
								
									d05dc33ebb
								
							
						
					
					
						commit
						249efce8e1
					
				| 
						 | 
					@ -34,6 +34,15 @@ export class Cloudevent {
 | 
				
			||||||
  public getData(): any;
 | 
					  public getData(): any;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * HTTP emitter for Structured mode
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					export class StructuredHTTPEmitter {
 | 
				
			||||||
 | 
					  public constructor(configuration?: any);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  public emit(event: Cloudevent): Promise;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Function to create CloudEvents instances
 | 
					 * Function to create CloudEvents instances
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,7 @@
 | 
				
			||||||
const Cloudevent = require("../lib/cloudevent.js");
 | 
					const Cloudevent = require("../lib/cloudevent.js");
 | 
				
			||||||
const Spec = require("../lib/specs/spec_1.js");
 | 
					const Spec = require("../lib/specs/spec_1.js");
 | 
				
			||||||
 | 
					const StructuredHTTPEmitter =
 | 
				
			||||||
 | 
					  require("../lib/bindings/http/emitter_structured.js");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function event() {
 | 
					function event() {
 | 
				
			||||||
  return new Cloudevent(Spec);
 | 
					  return new Cloudevent(Spec);
 | 
				
			||||||
| 
						 | 
					@ -7,5 +9,6 @@ function event() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module.exports = {
 | 
					module.exports = {
 | 
				
			||||||
  Spec,
 | 
					  Spec,
 | 
				
			||||||
 | 
					  StructuredHTTPEmitter,
 | 
				
			||||||
  event
 | 
					  event
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue