config

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2018 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package config implements the configuration management of piladb.

Index

Constants

View Source
const CONFIG = "_config"

CONFIG represents the name of the database that will hold all the config values.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Values *pila.Database
}

Config represents a Database containing all configuration values that will be updated and consumed by piladb.

func NewConfig

func NewConfig() *Config

NewConfig creates a new Config with empty values.

func (*Config) Get

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

Get gets a config value from a key.

func (*Config) MaxStackSize

func (c *Config) MaxStackSize() int

MaxStackSize returns the value of MAX_STACK_SIZE. Type: int, Default: -1

func (*Config) Port

func (c *Config) Port() int

Port returns the value of PORT. Type: int, Default: 1205

func (*Config) ReadTimeout

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

ReadTimeout returns the value of READ_TIMEOUT. Type: time.Duration, Default: 30

func (*Config) Set

func (c *Config) Set(key string, value interface{})

Set sets a config value having a key and the value.

func (*Config) WriteTimeout

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

WriteTimeout returns the value of WRITE_TIMEOUT. Type: time.Duration, Default: 45

Directories

Path Synopsis
Package vars defines the configuration variables and default values for piladb.
Package vars defines the configuration variables and default values for piladb.

Jump to

Keyboard shortcuts

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