apirtinit

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package apirtinit contains functionality for initializing a Mobroute Runtime. The MobrouteRuntime holds the open connection to the local SQLite DB and all other library functionality relies on the MobrouteRuntime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MobrouteRuntime

type MobrouteRuntime struct {
	MobsqlRuntime *mobsql.MobsqlRuntime
	DB            *sqlx.DB
}

MobrouteRuntime contains the database connection & MobsqlRuntime.

func RTInitialize

func RTInitialize(params *MobrouteRuntimeConfig) (*MobrouteRuntime, error)

RTInitialize initializes a MobrouteRuntime which contains a passthrough to the MobsqlRuntime & some additional metadata.

type MobrouteRuntimeConfig

type MobrouteRuntimeConfig struct {
	MobsqlRuntimeConfig mobsql.RuntimeConfig `json:"mobsql_runtime_config"`
	Logger              *log.Logger          `json:"-"`
	LogInfo             bool                 `json:"log_info"`
	LogWarn             bool                 `json:"log_warn"`
	LogDebug            bool                 `json:"log_debug"`
}

MobrouteRuntimeConfig contains the MobsqlRuntimeConfig & potentially in the future some other Mobroute-specific properties for the common DB connection & Mobroute params.

type MobsqlRuntimeConfig

type MobsqlRuntimeConfig = mobsql.RuntimeConfig

MobsqlRuntimeConfig is just an alias for Mobsql's RuntimeConfig, see mobsql.RuntimeConfig for further documentation.

Jump to

Keyboard shortcuts

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