config

package
v0.0.0-...-e03655c Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Namespace of I1820
	Namespace = "I1820"

	// Prefix indicates environment variables prefix
	Prefix = "I1820_"
)
View Source
const (
	// LinkPort is a port of link component
	LinkPort = 0
	// TMPort is a port of thing manager component
	TMPort = 1378
	// DMPort is port of data manager component
	DMPort = 1373
	// PMPort is port of project manager component
	PMPort = 1999
)

Component ports are defined here

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TM       TM       `koanf:"tm"`
	Database Database `koanf:"database"`
	NATS     NATS     `koanf:"nats"`
	MQTT     MQTT     `mapstrcuture:"mqtt"`
	Docker   Docker   `koanf:"docker"`
}

Config holds all link component configurations

func Default

func Default() Config

Default return default configuration nolint: gomnd

func New

func New() Config

New reads configuration with viper and create configuration instance

type Database

type Database struct {
	URL  string `koanf:"url"`
	Name string `koanf:"name"`
}

Database holds database configuration

type Docker

type Docker struct {
	Host   string `koanf:"host"`
	Runner Runner `koanf:"runner"`
}

Docker holds Docker Host configuration for running the runners

type MQTT

type MQTT struct {
	Addr string `koanf:"addr"`
}

MQTT holds MQTT configuration

type NATS

type NATS struct {
	URL string `koanf:"url"`
}

NATS hodls NATS configuration

type Runner

type Runner struct {
	Database Database `koanf:"database"`
	NATS     NATS     `koanf:"nats"`
}

Runner contains the information that are required in runners for get and store the data

type TM

type TM struct {
	URL string `koanf:"url"`
}

TM holds I1820 Things Manager configuration

Jump to

Keyboard shortcuts

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