Documentation ¶
Index ¶
- func AddDriver(driver Interface)
- func DriverName() string
- func Drivers() map[string]Interface
- func Publish(topic string, message []byte, params ...interface{}) error
- func Register() error
- func SetDefaultDriver(driver Interface)
- func Subscribe(topic string, onMessage func(topic string, message []byte, driver Interface), ...)
- type Interface
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DriverName ¶
func DriverName() string
func SetDefaultDriver ¶
func SetDefaultDriver(driver Interface)
Types ¶
type Interface ¶
type Interface interface { Name() string Register() error Subscribe(topic string, onMessage func(topic string, message []byte, driver Interface), params ...interface{}) Publish(topic string, message []byte, params ...interface{}) error // SetMarshaller set interface{} to []byte marshalling function SetMarshaller(func(input interface{}) ([]byte, error)) // SetUnMarshaller set []byte to interface{} unmarshalling function SetUnMarshaller(func(bytes []byte, out interface{}) error) }
Click to show internal directories.
Click to hide internal directories.