type

ExecuteOption

One opaque runtime option accepted by Execute.

Example

go
options := []ridu.ExecuteOption{
  ridu.WithStore(openStore),
  ridu.WithProjectMigrations(projectMigrations),
  ridu.WithAddress(":8080"),
  ridu.WithHandlerOptions(ridu.HandlerOptions{
    AdminAssets: adminassets.FS(),
  }),
}

if err := ridu.Execute(content.Config(), options...); err != nil {
  log.Fatal(err)
}

Properties

PropertyTypeDescription
WithStorefunc(StoreFactory) ExecuteOptionRequired in server mode. Lazily opens the singular document-store adapter.
WithProjectMigrationsfunc(migration.ProjectDriver) ExecuteOptionRegisters compiled migration callbacks for project migration commands.
WithAddressfunc(string) ExecuteOptionSets the HTTP listen address; the default is :8080.
WithHandlerOptionsfunc(HandlerOptions) ExecuteOptionConfigures HTTP security, limits, embedded admin assets, workers, and observers.
WithServerOptionsfunc(ServerOptions) ExecuteOptionConfigures socket bounds, readiness admission, and graceful shutdown.
WithUploadStoragefunc(StorageFactory) ExecuteOptionLazily opens object storage for upload-enabled applications.

How it works

Applications cannot implement this type because its input is private. Use WithStore, WithProjectMigrations, WithUploadStorage, WithAddress, WithHandlerOptions, and WithServerOptions; later duplicate options replace earlier values.

ExecuteOption is intentionally opaque: application code chooses from Ridu’s public With… constructors rather than mutating the internal server state or defining custom lifecycle options.

Options are applied in argument order when Execute starts the no-argument server branch. If the same constructor is supplied more than once, the later value replaces the earlier value for that setting.

When the executable is serving a project command, Execute resolves config and returns before applying these options. Store and storage factories therefore remain untouched during schema discovery, generate, and check.

Full signature

Related types

  • ExecuteOption

    Opaque production lifecycle option accepted by Execute.