storage

package
v0.0.0-...-153a600 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

mqttstore.storage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	Connection *sqlx.DB
	Channel    chan mqtt.Message
}

Storage object with Connection reference and worker Channel

func Initialize

func Initialize(engine string, dsn string) (storage Storage, e error)

Initialize the connection with the database, return a Storage struct or error

func (Storage) Worker

func (storage Storage) Worker()

Wait for messages in storage Channel and save them in database

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL