Documentation
¶
Overview ¶
Package bootstrap wires process startup dependencies.
Index ¶
- Constants
- Variables
- func BuildArtifactStorage(cfg config.WorkspaceStorageConfig, ...) (blob.ArtifactStorage, error)
- func BuildPersistStorage(cfg config.WorkspaceStorageConfig, persistRoot func(teamID string) string, ...) (blob.PersistStorage, error)
- func BuildS3Client(ctx context.Context, cfg config.WorkspaceStorageConfig) (blob.S3Client, error)
- func RunModelCommand(ctx context.Context, args []string, out io.Writer) error
- func RunServer(ctx context.Context, portOverride int) error
- func RunUserCommand(ctx context.Context, args []string, out io.Writer) error
- func RunWorker(ctx context.Context, taskRunID string) error
Constants ¶
const ModelCommandUsage = `` /* 1004-byte string literal not displayed */
ModelCommandUsage is the help text for `buildmax-server model`.
const UserCommandUsage = `` /* 799-byte string literal not displayed */
UserCommandUsage is the help text for `buildmax-server user`.
Variables ¶
var ErrAlreadyClaimed = errors.New("task run already claimed by another worker")
ErrAlreadyClaimed is returned by RunWorker when the run was already claimed by another worker.
Functions ¶
func BuildArtifactStorage ¶
func BuildArtifactStorage(cfg config.WorkspaceStorageConfig, runOutputDir func(userID, conversationID, taskID, taskRunID string) string, s3Client blob.S3Client) (blob.ArtifactStorage, error)
BuildArtifactStorage returns the configured artifact storage implementation. runOutputDir is (userID, conversationID, taskID, taskRunID) -> path for run output files.
func BuildPersistStorage ¶
func BuildPersistStorage(cfg config.WorkspaceStorageConfig, persistRoot func(teamID string) string, s3Client blob.S3Client) (blob.PersistStorage, error)
BuildPersistStorage returns the configured persist storage implementation.
func BuildS3Client ¶
BuildS3Client creates an S3-compatible client. Use when either provider is minio.
Two shapes are supported, and the endpoint is what distinguishes them: a deployment naming an endpoint is talking to a store it runs or a vendor's S3-compatible service, while one that names none is talking to AWS S3 and wants the SDK's own regional endpoint resolution.
Credentials follow the same principle. Static keys are used when configured; leaving them empty falls through to the SDK's default chain, which is how a cluster reaches a bucket through IRSA, workload identity, or an instance profile instead of a long-lived key the deployment has to store and rotate.
func RunModelCommand ¶
RunModelCommand executes `buildmax-server model ...`. args excludes the "model" word itself.
func RunServer ¶
RunServer loads server.yaml, resolves the listen port (flag overrides config), opens the DB, builds blob storage, starts the scheduler, and runs the HTTP server. portOverride > 0 takes priority over the port in server.yaml.
func RunUserCommand ¶
RunUserCommand executes `buildmax-server user ...`. args excludes the "user" word itself.
Types ¶
This section is empty.