config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ControlUser string = "DTAIL-CONTROL-USER"

ControlUser is used for various DTail specific operations.

Variables

This section is empty.

Functions

func Read

func Read(configFile string, sshPort int)

Read the DTail configuration.

func ServerUserPermissions

func ServerUserPermissions(userName string) (permissions []string, err error)

ServerUserPermissions retrieves the permission set of a given user.

Types

type ClientConfig

type ClientConfig struct {
}

ClientConfig represents a DTail client configuration (empty as of now as there are no available config options yet, but that may changes in the future).

var Client *ClientConfig

Client holds a DTail client configuration.

type CommonConfig

type CommonConfig struct {
	// The SSH server port number.
	SSHPort int
	// Enable experimental features.
	ExperimentalFeaturesEnable bool `json:",omitempty"`
	// Enable extra debug logging (used for deevlopment or debugging purpes only).
	DebugEnable bool `json:",omitempty"`
	// Enable extra trace logging (used for deevlopment or debugging purpes only).
	TraceEnable bool `json:",omitempty"`
	// The log strategy to use, one of
	//   stdout: only log to stdout (useful when used with systemd)
	//   daily: create a log file for every day
	LogStrategy string
	// The log directory
	LogDir string
	// The cache directory
	CacheDir string
	// Do we want to enable pperf http server?
	PProfEnable bool `json:",omitempty"`
	// The HTTP port used by PProf
	PProfPort int `json:",omitempty"`
	// The PProf HTTP server bind address
	PProfBindAddress string `json:",omitempty"`
}

CommonConfig stores configuration keys shared by DTail server and client.

var Common *CommonConfig

Common holds common configs of both both, client and server.

type Permissions

type Permissions struct {
	// The default user permissions.
	Default []string
	// The per user special permissions.
	Users map[string][]string
}

Permissions map. Each SSH user has a list of permissions which log files it is allowed to follow and which ones not.

type ServerConfig

type ServerConfig struct {
	// The SSH server bind port.
	SSHBindAddress string
	// The max amount of concurrent user connection allowed to connect to the server.
	MaxConnections int
	// The max amount of concurrent cats per server.
	MaxConcurrentCats int
	// The max amount of concurrent tails per server.
	MaxConcurrentTails int
	// The user permissions.
	Permissions Permissions `json:",omitempty"`
	// The mapr log format
	MapreduceLogFormat string `json:",omitempty"`
	// The default path of the server host key
	HostKeyFile string
	// The host key size in bits
	HostKeyBits int
}

ServerConfig represents the server configuration.

var Server *ServerConfig

Server holds a DTail server configuration.

Jump to

Keyboard shortcuts

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