cmd

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 51 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute adds all child commands to the root command and sets flags appropriately.

Types

type Server added in v0.6.0

type Server struct {
	Router *gin.Engine
	Config *config.Config
	// Queue driver and client of background jobs.
	QueueDriver string
	Queue       queue.Client
	DB          *gorm.DB
}

Server is an initialized GoHead.

func InitializeServer

func InitializeServer(cfgPath string, opts ServerOptions) (*Server, func(), error)

InitializeServer builds the router and its dependencies. The returned cleanup function releases long-lived resources (queue client, tracer) and must be called when the server stops.

type ServerOptions added in v0.6.0

type ServerOptions struct {
	// Standalone runs the worker, dispatcher and scheduler in the API
	// process, with the database job queue unless configured otherwise.
	Standalone bool
	// DataDir holds the SQLite database, the uploads and a generated JWT
	// secret, unless they are configured otherwise.
	DataDir string
}

ServerOptions changes how the server runs.

Jump to

Keyboard shortcuts

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