config

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateJobLogPath added in v0.5.0

func GenerateJobLogPath(c BobbitConfig, p payload.JobDetailMetadata) string

GenerateJobLogPath will generate full path of log path. It automatically creates the parent directories if they do not exist.

Types

type BobbitClientConfig added in v0.5.0

type BobbitClientConfig struct {
	// BobbitConfig holds the configuration parameters for the Bobbit daemon.
	BobbitConfig
}

func NewClient added in v0.5.0

func NewClient() BobbitClientConfig

NewClient creates and initializes a new BobbitConfig instance for Bobbit client.

type BobbitConfig

type BobbitConfig struct {
	// SocketPath specifies the file system path for the Unix domain socket.
	//
	// Default: `/tmp/bobbitd.sock`
	SocketPath string
	// DebugMode indicates whether the daemon should run in debug mode, enabling verbose logging.
	DebugMode bool
	// DataPath specifies the root directory for data storage.
	//
	// The directory stores: `metadata.db` that stores job status and metadata; `logs/YYYY/MM/*.log`
	// that stores logfile. Typically the logfile filename is random 64-bit hash pointer in the
	// metadata database.
	//
	// - For daemon: REQUIRED. Stores metadata.db and logs/
	//
	// - For client: OPTIONAL. Enables local log access if client shares filesystem with daemon.
	//
	// Default: `/tmp/bobbitd/`
	DataPath string
}

BobbitConfig holds the configuration parameters for the Bobbit.

func BaseConfig added in v0.5.0

func BaseConfig() BobbitConfig

New creates and initializes a new BobbitConfig instance. It retrieves configuration values from environment variables or uses default paths. DebugMode is enabled if the "DEBUG" environment variable is set to any non-empty value.

type BobbitDaemonConfig added in v0.5.0

type BobbitDaemonConfig struct {
	// SetMaxOpenConns sets the maximum number of open connections to the database. The default is 1.
	//
	// Check `(sql.DB).SetMaxOpenConns` for more information.
	DBMaxOpenConn int
	// SetMaxOpenConns sets the maximum number of open connections to the database. The default is 1.
	//
	// Check `(sql.DB).SetMaxIdleConns` for more information.
	DBMaxIdleConn int
	// BobbitConfig holds the configuration parameters for the Bobbit daemon.
	BobbitConfig
}

func NewDaemon added in v0.5.0

func NewDaemon() BobbitDaemonConfig

NewDaemon creates and initializes a new BobbitConfig instance for Bobbit daemon.

Jump to

Keyboard shortcuts

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