Documentation ¶
Index ¶
- Variables
- func CloseCore()
- func Execute(fn func() error, msg string)
- func InitCore()
- func MustExecute(fn func() error, msg string)
- func MustUnmarshalFromConfig(key string, v interface{})
- func NtoI2cBusName(n int) string
- func NtoPinName(pin int) string
- func UnmarshalFromConfig(key string, v interface{}) error
Constants ¶
This section is empty.
Variables ¶
var ( // BluetoothDevice is a default Bluetooth device instance. BluetoothDevice ble.Device )
var LevelDB *leveldb.DB
LevelDB is an instance of the LevelDB client for managing persistent cache.
var Logger = logging.MustGetLogger("sensorsys")
Logger is an instance of the shared logger tool.
Functions ¶
func Execute ¶
Execute executes `fn` function and in case of error logs it. Use `msg` to specify details of error to wrap by.
func MustExecute ¶
MustExecute executes `fn` function and in case of error logs it, followed by a call to os.Exit(1). Use `msg` to specify details of error to wrap by.
func MustUnmarshalFromConfig ¶
func MustUnmarshalFromConfig(key string, v interface{})
MustUnmarshalFromConfig retrieves config block by given `key` and decodes it into given structure `v`. In case of unmarshalling error occurrence it will log fatal error.
func NtoI2cBusName ¶
NtoI2cBusName returns I2C bus name based on specified `n` number.
func NtoPinName ¶
NtoPinName returns GPIO pin name based on specified `pin` number.
func UnmarshalFromConfig ¶
UnmarshalFromConfig retrieves config block by given `key` and decodes it into given structure `v`.
Types ¶
This section is empty.