config

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultDomainsTableName is the default name for the domains table.
	DefaultDomainsTableName = "Domains"

	// DefaultLogFormat is the default format of the logging.
	// The default is to log to JSON.
	DefaultLogFormat = "json"

	// DefaultLogLevel is the default logging level.
	DefaultLogLevel = log.WarnLevel

	// DefaultTermSignal is the signal to term the agent.
	DefaultTermSignal = syscall.SIGTERM

	// DefaultReloadSignal is the default signal for reload.
	DefaultReloadSignal = syscall.SIGHUP

	// DefaultKillSignal is the default signal for termination.
	DefaultKillSignal = syscall.SIGINT

	// DefaultVerbose is the default verbosity.
	DefaultVerbose = false

	// DefaultTimeout is the default time to configure the runtime
	DefaultTimeout = 1 * time.Minute

	// DefaultHTTPSPort is the default port for HTTPS
	DefaultHTTPSPort = 443

	// DefaultHTTPPort is the default port for HTTP
	DefaultHTTPPort = 80

	// DefaultAPIPort is the default port for API
	DefaultAPIPort = 8888

	// DefaultHost to listen on
	DefaultHost = ""

	// DefaultAcme
	DefaultAcme = true

	// DefaultAcmeUrl (default is actually the staging, you should try here)
	DefaultAcmeUrl = "https://acme-v01.api.letsencrypt.org/directory"

	// DefaultAcmeSkipTLS is skipping validation of acme directory
	DefaultAcmeSkipTLS = false

	// DefaultCacheSize
	DefaultCacheSize = 1000

	// DefaultCacheTTL (1min)
	DefaultCacheTTL = int64((5 * time.Second) / time.Nanosecond)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Verbose toggles the verbosity
	Verbose bool

	// LogLevel is the level with with to log for this config
	LogLevel log.Level

	// ReloadSignal
	ReloadSignal syscall.Signal

	// TermSignal
	TermSignal syscall.Signal

	// KillSignal
	KillSignal syscall.Signal

	// Timeout of the runtime
	Timeout time.Duration

	// DomainsTableName is the name of the database table
	DomainsTableName string

	// LogFormat
	LogFormat string

	// HTTPPort is the port for HTTP
	HTTPPort int

	// HTTPSPort is the port for HTTPS
	HTTPSPort int

	// APIPort is the port for API
	APIPort int

	// CacheSize is the size of the cache
	CacheSize int

	// CacheTTL is the timeout for the cache
	CacheTTL int64

	// Host is the host to listen on
	Host string

	// Provider connection
	Provider provider.Provider

	// Acme
	Acme bool

	// AcmeStaging
	AcmeUrl string

	// AcmeSkipTLS
	AcmeSkipTLS bool

	// DynamoDB
	DynamoDB DynamoDB

	// Mongo
	Mongo Mongo
}

Config contains a configuration for outlaw

func New

func New() *Config

New returns a new Config

func (*Config) APIListener

func (c *Config) APIListener() string

APIListener returns the listener for API

func (*Config) HTTPListener

func (c *Config) HTTPListener() string

HTTPListener returns the listener for HTTP

func (*Config) HTTPSListener

func (c *Config) HTTPSListener() string

HTTPSListener returns the listener for HTTPS

type DynamoDB

type DynamoDB struct {
	// Enable DynamoDB
	Enable bool

	// DynamoDB table
	Table string

	// DynamoDB endpoint
	Endpoint string

	// DynamoDBRegion
	Region string

	// DynamoDBAccessKey is the AWS Access Key
	AccessKey string

	// DynamoDBSecretKey is the AWS Secret Key
	SecretKey string
}

type Mongo

type Mongo struct {
	// Enable
	Enable bool

	// Database
	Database string

	// Endpoint
	Endpoint string

	// Username
	Username string

	// Password
	Password string

	// Auth Database
	AuthDatabase string
}

Jump to

Keyboard shortcuts

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