config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2018 License: MIT Imports: 6 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GAkisitorConfig

type GAkisitorConfig struct {
	System  SystemDefinition   `json:"system"`
	Modules []ModuleDefinition `json:"modules"`
	Log     []LogDefinition    `json:"log"`
	// contains filtered or unexported fields
}

GAkisitorConfig is the configuration that comes from loading the configuration File

func (*GAkisitorConfig) FilePtr

func (p *GAkisitorConfig) FilePtr() *string

FilePtr return a pointer of the configuration file path

func (*GAkisitorConfig) IsLoaded

func (p *GAkisitorConfig) IsLoaded() bool

IsLoaded return the current loading state

func (*GAkisitorConfig) Load

func (p *GAkisitorConfig) Load() error

Load performs the loading file and unmarshal it into itself

func (*GAkisitorConfig) WaitReconfiguration

func (p *GAkisitorConfig) WaitReconfiguration(d time.Duration) error

WaitReconfiguration wait until the configuration file was modified. Next, this function reload the file

type LogDefinition

type LogDefinition struct {
	File     string `json:"File"`
	Format   string `json:"format"`
	Encoding string `json:"encoding"`
	Level    string `json:"level"`
	Raw      RawConfig
}

LogDefinition define log information, used during logger instantiation

type ModuleDefinition

type ModuleDefinition struct {
	Name   string    `json:"name"`
	Path   string    `json:"path"`
	Config RawConfig `json:"config"`
}

ModuleDefinition define module information like name or internal configuration

type RawConfig

type RawConfig interface{}

RawConfig is a type for unknowing configuration

type SystemDefinition

type SystemDefinition struct {
	LinkID     string `json:"link_id"`
	DeviceName string `json:"device"`

	ServerIP   string `json:"ip"`
	ServerPort int    `json:"port"`
	ServerSSL  bool   `json:"ssl"`
}

SystemDefinition define some information about the current system and network

Jump to

Keyboard shortcuts

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