conman

package
v0.0.0-...-4e7f4fc Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() *Config

returns new config

func (*Config) Get

func (c *Config) Get(key string) interface{}

returns the interface of the requested config

func (*Config) GetAll

func (c *Config) GetAll() map[string]interface{}

returns all the config

func (*Config) GetCurrentWatchInterval

func (c *Config) GetCurrentWatchInterval() time.Duration

returns current watch interval

func (*Config) GetFileName

func (c *Config) GetFileName() string

returns current file name

func (*Config) Set

func (c *Config) Set(data []byte) error

sets config according to the byte array data provided

func (*Config) SetFilename

func (c *Config) SetFilename(fileName string)

sets filename

func (*Config) SetFromFile

func (c *Config) SetFromFile() error

sets config from file

func (*Config) UnWatchFileChanges

func (c *Config) UnWatchFileChanges()

disable watching to file changes

func (*Config) WatchFileChanges

func (c *Config) WatchFileChanges(duration time.Duration)

enable watching file changes in regular intervals using go routine

func (*Config) WriteConfigToFile

func (c *Config) WriteConfigToFile(data []byte) error

write configuration to file

Jump to

Keyboard shortcuts

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