config

package
v0.0.0-...-0dca507 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2021 License: GPL-3.0 Imports: 11 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 db.Config `koanf:"database"`
	NATS     NATS      `koanf:"nats"`
	MQTT     MQTT      `koanf:"mqtt"`
	Docker   Docker    `koanf:"docker"`
}

Config holds all link component configurations.

func Default

func Default() Config

func New

func New() Config

New reads configuration with koanf and create configuration instance.

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 db.Config `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