Documentation ¶
Index ¶
- type Module
- func (m *Module) Call(service, function string, auth map[string]interface{}, params interface{}, ...) (interface{}, error)
- func (m *Module) CallWithContext(ctx context.Context, service, function string, auth map[string]interface{}, ...) (interface{}, error)
- func (m *Module) HandleServiceResponse(res *model.FunctionsPayload)
- func (m *Module) IsEnabled() bool
- func (m *Module) RegisterService(clientID string, req *model.ServiceRegisterRequest, sendPayload SendPayload)
- func (m *Module) UnregisterService(clientID string)
- type SendPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
Module is responsible for functions
func (*Module) Call ¶
func (m *Module) Call(service, function string, auth map[string]interface{}, params interface{}, timeout int) (interface{}, error)
Call simply calls a function on a service
func (*Module) CallWithContext ¶ added in v0.12.0
func (m *Module) CallWithContext(ctx context.Context, service, function string, auth map[string]interface{}, params interface{}) (interface{}, error)
CallWithContext invokes function on a service. The response from the function is returned back along with any errors if they occurred.
func (*Module) HandleServiceResponse ¶
func (m *Module) HandleServiceResponse(res *model.FunctionsPayload)
HandleServiceResponse handles the service response
func (*Module) RegisterService ¶
func (m *Module) RegisterService(clientID string, req *model.ServiceRegisterRequest, sendPayload SendPayload)
RegisterService registers a new service with the functions module
func (*Module) UnregisterService ¶
UnregisterService removes a service from the functions module
type SendPayload ¶
type SendPayload func(*model.FunctionsPayload)
SendPayload is the function called whenever a data point (payload) is to be sent
Click to show internal directories.
Click to hide internal directories.