config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 8 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 {
	// Data
	DataPath      string
	ContainerSize int64
	MinEmptySpace int64
	DumpTime      time.Duration
	TmpDir        string
	CpuNum        int

	// Http
	HttpWriteAddr    string
	HttpReadAddr     string
	HttpWriteTimeout time.Duration
	HttpReadTimeout  time.Duration
	ETagSupport      bool
	Md5Header        bool
	ContentRange     int64
	StatusJson       string
	StatusHtml       string

	// Rpc
	RpcAddr string

	// Http Headers
	Headers map[string]string

	// Mime Types
	MimeTypes map[string]string

	// Log
	LogLevel  int
	LogFile   string
	LogAccess string

	//Downloader
	DownloaderEnable    bool
	DownloaderParamName string

	// Uploader
	UploaderEnable    bool
	UploaderCtrlUrl   string
	UploaderParamName string
}

func (*Config) ReadFile

func (conf *Config) ReadFile(filename string)

Parse file and set values to config

func (*Config) RegisterMime

func (conf *Config) RegisterMime()

Register all mime types from config

Jump to

Keyboard shortcuts

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