Documentation
¶
Index ¶
- type Sample
- func (s *Sample) ConvertEventToXML(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{})
- func (s *Sample) LogEventDetails(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{})
- func (s *Sample) OutputXML(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{})
- func (s *Sample) SendGetCommand(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sample ¶
type Sample struct {
// contains filtered or unexported fields
}
Sample ...
func NewSample ¶
func NewSample() Sample
NewSample ... TODO: Add parameters that the function(s) will need each time one is executed
func (*Sample) ConvertEventToXML ¶
func (s *Sample) ConvertEventToXML(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{})
ConvertEventToXML is example of transforming an Event and passing the transformed data to next function in the pipeline
func (*Sample) LogEventDetails ¶
func (s *Sample) LogEventDetails(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{})
LogEventDetails is example of processing an Event and passing the original Event to next function in the pipeline For more details on the Context API got here: https://docs.edgexfoundry.org/latest/microservices/application/ContextAPI/
func (*Sample) OutputXML ¶
func (s *Sample) OutputXML(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{})
OutputXML is an example of processing transformed data
func (*Sample) SendGetCommand ¶
func (s *Sample) SendGetCommand(ctx interfaces.AppFunctionContext, data interface{}) (bool, interface{})
SendGetCommand is example of how to use the CommandClient to query available commands and send Get commands to devices. It uses the device from the incoming Event as the target for the commanding and selects the first available Get command from the query response (which is kind of random for this example).