Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BootstrapDependencies ¶
type BootstrapDependencies struct {
DBPool *config.DBPool
SessionService session.Service
TaskService task.Service
VectorProvider vector.Provider
}
BootstrapDependencies holds the dependencies available to the runtime factory.
type RuntimeFactory ¶
type RuntimeFactory func(ctx context.Context, deps BootstrapDependencies, appID string, appCfg *config.AppConfig) (server.Runtime, error)
RuntimeFactory creates a runtime for an app.
type ServeOption ¶
type ServeOption func(*ServeOptions)
ServeOption is a functional option for Serve.
func WithAutoSecret ¶ added in v1.31.3
func WithAutoSecret(secret string) ServeOption
WithAutoSecret sets an auto-generated secret to display prominently in the startup banner.
func WithConfigPath ¶
func WithConfigPath(path string) ServeOption
WithConfigPath sets the path to the app config file.
func WithRuntimeFactory ¶
func WithRuntimeFactory(f RuntimeFactory) ServeOption
WithRuntimeFactory sets a custom runtime factory.
func WithServerConfig ¶
func WithServerConfig(cfg *config.ServerConfig) ServeOption
WithServerConfig sets the server configuration.
func WithSync ¶ added in v1.41.0
func WithSync(sync bool) ServeOption
WithSync forces the config file to overwrite the database config on startup.
type ServeOptions ¶
type ServeOptions struct {
// ServerConfig is the operational configuration (port, db, etc).
ServerConfig *config.ServerConfig
// ConfigPath is the path to the app config file (yaml).
ConfigPath string
// Watch enables config file watching for hot-reload.
Watch bool
// Sync forces the config file to overwrite the database config on startup.
// Without this, the file only seeds the DB when the app doesn't exist yet.
Sync bool
// RuntimeFactory is the factory for creating runtimes.
// If nil, defaults to standard runtime.NewBuilder().WithConfig(cfg).Build().
RuntimeFactory RuntimeFactory
// AutoSecret is set when the auth secret was auto-generated (not user-provided).
// It is displayed prominently in the startup banner.
AutoSecret string
}
ServeOptions configuration for the Serve function.
Click to show internal directories.
Click to hide internal directories.