Documentation
¶
Overview ¶
Package bootstrap provides a declarative application bootstrapper for go-wind.
It reads a [BootstrapConfig] (defined via Protobuf) and assembles the corresponding go-wind [App] with the right combination of servers, registries, config sources, loggers, tracers, metrics, and brokers from go-wind-plugins.
The core flow is:
BootstrapConfig → Builder registry → wind.Option chain → wind.App
Package bootstrap provides builder registration for all plugin domains.
Each plugin domain (server, config, registry, log, tracer, metrics, broker) maintains a map of string-keyed builder functions. The key is a lowercase type string (e.g. "consul", "zap") matching the JSON config value. Built-in builders are registered via init() in provider packages. Users can register custom builders to extend the framework.
Index ¶
- Constants
- func Bootstrap(ctx context.Context, cfg *v1.BootstrapConfig) (*wind.App, map[string]any, map[string]any, map[string]any, map[string]any, ...)
- func ListAiBuilders() []string
- func ListBrokerBuilders() []string
- func ListCacheBuilders() []string
- func ListConfigActions() []string
- func ListDatabaseBuilders() []string
- func ListLogBuilders() []string
- func ListMetricsBuilders() []string
- func ListRegistryActions() []string
- func ListScriptEngineBuilders() []string
- func ListServerBuilders() []string
- func ListStorageBuilders() []string
- func ListTracerBuilders() []string
- func ListWorkflowBuilders() []string
- func LoadConfig(data []byte) (*v1.BootstrapConfig, error)
- func LoadConfigBinary(data []byte) (*v1.BootstrapConfig, error)
- func LoadConfigFromFile(path string) (*v1.BootstrapConfig, error)
- func LoadConfigFromYAML(data []byte) (*v1.BootstrapConfig, error)
- func MustRegisterAiBuilder(typ string, b AiBuilder)
- func MustRegisterBrokerBuilder(typ string, b BrokerBuilder)
- func MustRegisterCacheBuilder(typ string, b CacheBuilder)
- func MustRegisterConfigAction(typ string, a ConfigAction)
- func MustRegisterDatabaseBuilder(typ string, b DatabaseBuilder)
- func MustRegisterLogBuilder(typ string, b LogBuilder)
- func MustRegisterMetricsBuilder(typ string, b MetricsBuilder)
- func MustRegisterRegistryAction(typ string, a RegistryAction)
- func MustRegisterScriptEngineBuilder(typ string, b ScriptEngineBuilder)
- func MustRegisterServerBuilder(typ string, b ServerBuilder)
- func MustRegisterStorageBuilder(typ string, b StorageBuilder)
- func MustRegisterTracerBuilder(typ string, b TracerBuilder)
- func MustRegisterWorkflowBuilder(typ string, b WorkflowBuilder)
- func NewRootCmd(f *CommandFlags, runE func(cmd *cobra.Command, args []string) error) *cobra.Command
- func RegisterAiBuilder(typ string, b AiBuilder) error
- func RegisterBrokerBuilder(typ string, b BrokerBuilder) error
- func RegisterCacheBuilder(typ string, b CacheBuilder) error
- func RegisterConfigAction(typ string, a ConfigAction) error
- func RegisterDatabaseBuilder(typ string, b DatabaseBuilder) error
- func RegisterLogBuilder(typ string, b LogBuilder) error
- func RegisterMetricsBuilder(typ string, b MetricsBuilder) error
- func RegisterRegistryAction(typ string, a RegistryAction) error
- func RegisterScriptEngineBuilder(typ string, b ScriptEngineBuilder) error
- func RegisterServerBuilder(typ string, b ServerBuilder) error
- func RegisterStorageBuilder(typ string, b StorageBuilder) error
- func RegisterTracerBuilder(typ string, b TracerBuilder) error
- func RegisterWorkflowBuilder(typ string, b WorkflowBuilder) error
- func Run(ctx context.Context, cfg *v1.BootstrapConfig) error
- func RunApp(configPath string) error
- func RunAppWithFlags(flags *CommandFlags, opts ...func(root *cobra.Command)) error
- type AiBuilder
- type BrokerBuilder
- type CacheBuilder
- type CommandFlags
- type ConfigAction
- type Context
- func (c *Context) Ai(name string) any
- func (c *Context) Ais() map[string]any
- func (c *Context) App() *wind.App
- func (c *Context) Broker(name string) any
- func (c *Context) Brokers() map[string]any
- func (c *Context) Cache(name string) any
- func (c *Context) Caches() map[string]any
- func (c *Context) Cancel()
- func (c *Context) Cleanup()
- func (c *Context) Config() *v1.BootstrapConfig
- func (c *Context) Database(name string) any
- func (c *Context) Databases() map[string]any
- func (c *Context) ScriptEngine(name string) any
- func (c *Context) ScriptEngines() map[string]any
- func (c *Context) Storage(name string) any
- func (c *Context) Storages() map[string]any
- func (c *Context) Workflow(name string) any
- func (c *Context) Workflows() map[string]any
- type DatabaseBuilder
- type LogBuilder
- type MetricsBuilder
- type RegistryAction
- type ScriptEngineBuilder
- type ServerBuilder
- type StorageBuilder
- type TracerBuilder
- type WorkflowBuilder
Constants ¶
const ( ServerTypeHTTP = "http" ServerTypeHTTP3 = "http3" ServerTypeGRPC = "grpc" ServerTypeGraphQL = "graphql" ServerTypeSSE = "sse" ServerTypeWebSocket = "websocket" ServerTypeTCP = "tcp" ServerTypeUDP = "udp" ServerTypeKCP = "kcp" ServerTypeThrift = "thrift" ServerTypeTRPC = "trpc" ServerTypeWebTransport = "webtransport" ServerTypeCron = "cron" ServerTypeHPTimer = "hptimer" ServerTypeMCP = "mcp" ServerTypeSignalR = "signalr" ServerTypeSocketIO = "socketio" ServerTypeWebRTC = "webrtc" ServerTypeAsynq = "asynq" ServerTypeMachinery = "machinery" // Broker-based transport servers. ServerTypeKafka = "kafka" ServerTypeRabbitMQ = "rabbitmq" ServerTypeRedis = "redis" ServerTypeNATS = "nats" ServerTypeMQTT = "mqtt" ServerTypePulsar = "pulsar" ServerTypeActiveMQ = "activemq" ServerTypeAzureSB = "azuresb" ServerTypeNSQ = "nsq" ServerTypeRocketMQ = "rocketmq" ServerTypeSQS = "sqs" )
Server type 常量,用于注册 Builder 时的 key。
const ( ConfigTypeFile = "file" ConfigTypeFs = "fs" ConfigTypeEtcd = "etcd" ConfigTypeNacos = "nacos" ConfigTypeConsul = "consul" ConfigTypeApollo = "apollo" ConfigTypeKubernetes = "kubernetes" ConfigTypeRedis = "redis" ConfigTypeZookeeper = "zookeeper" ConfigTypeVault = "vault" ConfigTypeHTTP = "http" ConfigTypeEnv = "env" ConfigTypeOSS = "oss" ConfigTypePolaris = "polaris" )
Config type 常量,用于注册 ConfigAction 时的 key。
const ( RegistryTypeConsul = "consul" RegistryTypeEtcd = "etcd" RegistryTypeNacos = "nacos" RegistryTypeZookeeper = "zookeeper" RegistryTypePolaris = "polaris" RegistryTypeEureka = "eureka" RegistryTypeKubernetes = "kubernetes" RegistryTypeServiceComb = "service_comb" )
Registry type 常量。
const ( LoggerTypeZap = "zap" LoggerTypeZerolog = "zerolog" LoggerTypeSlog = "slog" LoggerTypeLogrus = "logrus" LoggerTypeCharm = "charm" LoggerTypePhuslu = "phuslu" LoggerTypeGlog = "glog" LoggerTypeHclog = "hclog" LoggerTypeFluent = "fluent" LoggerTypeLoki = "loki" LoggerTypeSentry = "sentry" LoggerTypeAliyun = "aliyun" LoggerTypeTencent = "tencent" LoggerTypeCloudWatch = "cloudwatch" )
Logger type 常量。
const ( MetricsTypePrometheus = "prometheus" MetricsTypeOTLP = "otlp" )
Metrics type 常量。
const ( BrokerTypeKafka = "kafka" BrokerTypeRabbitMQ = "rabbitmq" BrokerTypeRedis = "redis" BrokerTypeNATS = "nats" BrokerTypeMQTT = "mqtt" BrokerTypePulsar = "pulsar" BrokerTypeAzureSB = "azuresb" BrokerTypeGCPubSub = "gcpubsub" BrokerTypeNSQ = "nsq" BrokerTypeRocketMQ = "rocketmq" BrokerTypeSQS = "sqs" BrokerTypeSTOMP = "stomp" BrokerTypeActiveMQ = "activemq" )
Broker type 常量,用于注册 BrokerBuilder 时的 key。
const ( StorageTypeMinio = "minio" StorageTypeS3 = "s3" )
Storage type 常量,用于注册 StorageBuilder 时的 key。
const ( AiTypeOpenAI = "openai" AiTypeLangChainGo = "langchaingo" AiTypeEino = "eino" )
AI type 常量,用于注册 AiBuilder 时的 key。
const ( WorkflowTypeTemporal = "temporal" WorkflowTypeArgo = "argo" WorkflowTypeConductor = "conductor" WorkflowTypeGoWorkflows = "goworkflows" )
Workflow type 常量,用于注册 WorkflowBuilder 时的 key。
const ( CacheTypeLocal = "local" CacheTypeRedis = "redis" )
Cache type 常量,用于注册 CacheBuilder 时的 key。
const ( ScriptEngineLua = "lua" ScriptEngineJavaScript = "javascript" ScriptEngineGPython = "gpython" ScriptEngineYaegi = "yaegi" ScriptEngineWazero = "wazero" ScriptEngineCEL = "cel" ScriptEngineExpr = "expr" ScriptEngineStarlark = "starlark" ScriptEngineTcl = "tcl" )
Script Engine type 常量。
const ( DatabaseTypeGorm = "gorm" DatabaseTypeMongodb = "mongodb" DatabaseTypeClickhouse = "clickhouse" DatabaseTypeDoris = "doris" DatabaseTypeElasticsearch = "elasticsearch" DatabaseTypeOpensearch = "opensearch" DatabaseTypeInfluxdb = "influxdb" DatabaseTypeCassandra = "cassandra" )
Database type 常量,用于注册 DatabaseBuilder 时的 key。
const (
TracerTypeOTLP = "otlp"
)
Tracer type 常量。
Variables ¶
This section is empty.
Functions ¶
func Bootstrap ¶
func Bootstrap(ctx context.Context, cfg *v1.BootstrapConfig) (*wind.App, map[string]any, map[string]any, map[string]any, map[string]any, map[string]any, map[string]any, map[string]any, func(), error)
Bootstrap reads a [BootstrapConfig], resolves all configured subsystems through the builder registry, constructs a *wind.App, and returns it along with a map of broker instances keyed by type name and a cleanup function.
The caller is responsible for calling wind.App.Run.
cleanup must be called after the app stops to release resources (e.g. deregister from registry, flush tracers).
The broker map (first return value) may be nil if no broker is configured. Use the type key to look up a specific broker instance:
b, ok := brokers[bootstrap.BrokerTypeKafka]
if ok { /* use b as your kafka broker */ }
func ListAiBuilders ¶
func ListAiBuilders() []string
ListAiBuilders returns all registered AI type names.
func ListBrokerBuilders ¶
func ListBrokerBuilders() []string
ListBrokerBuilders returns all registered broker type names.
func ListCacheBuilders ¶
func ListCacheBuilders() []string
ListCacheBuilders returns all registered cache type names.
func ListConfigActions ¶
func ListConfigActions() []string
ListConfigActions returns all registered config type names.
func ListDatabaseBuilders ¶
func ListDatabaseBuilders() []string
ListDatabaseBuilders returns all registered database type names.
func ListLogBuilders ¶
func ListLogBuilders() []string
ListLogBuilders returns all registered log type names.
func ListMetricsBuilders ¶
func ListMetricsBuilders() []string
ListMetricsBuilders returns all registered metrics type names.
func ListRegistryActions ¶
func ListRegistryActions() []string
ListRegistryActions returns all registered registry type names.
func ListScriptEngineBuilders ¶
func ListScriptEngineBuilders() []string
ListScriptEngineBuilders returns all registered script engine type names.
func ListServerBuilders ¶
func ListServerBuilders() []string
ListServerBuilders returns all registered server type names.
func ListStorageBuilders ¶
func ListStorageBuilders() []string
ListStorageBuilders returns all registered storage type names.
func ListTracerBuilders ¶
func ListTracerBuilders() []string
ListTracerBuilders returns all registered tracer type names.
func ListWorkflowBuilders ¶
func ListWorkflowBuilders() []string
ListWorkflowBuilders returns all registered workflow type names.
func LoadConfig ¶
func LoadConfig(data []byte) (*v1.BootstrapConfig, error)
LoadConfig unmarshals a JSON-encoded [BootstrapConfig].
func LoadConfigBinary ¶
func LoadConfigBinary(data []byte) (*v1.BootstrapConfig, error)
LoadConfigBinary unmarshals a binary-encoded (proto wire format) [BootstrapConfig].
func LoadConfigFromFile ¶
func LoadConfigFromFile(path string) (*v1.BootstrapConfig, error)
LoadConfigFromFile reads a [BootstrapConfig] from the given file path. It auto-detects the format by extension:
- .yaml, .yml → YAML
- .json → JSON
- .bin, .pb → Protobuf binary
func LoadConfigFromYAML ¶
func LoadConfigFromYAML(data []byte) (*v1.BootstrapConfig, error)
LoadConfigFromYAML unmarshals a YAML-encoded [BootstrapConfig].
func MustRegisterAiBuilder ¶
MustRegisterAiBuilder panics on error.
func MustRegisterBrokerBuilder ¶
func MustRegisterBrokerBuilder(typ string, b BrokerBuilder)
MustRegisterBrokerBuilder panics on error.
func MustRegisterCacheBuilder ¶
func MustRegisterCacheBuilder(typ string, b CacheBuilder)
MustRegisterCacheBuilder panics on error.
func MustRegisterConfigAction ¶
func MustRegisterConfigAction(typ string, a ConfigAction)
MustRegisterConfigAction panics on error.
func MustRegisterDatabaseBuilder ¶
func MustRegisterDatabaseBuilder(typ string, b DatabaseBuilder)
MustRegisterDatabaseBuilder panics on error.
func MustRegisterLogBuilder ¶
func MustRegisterLogBuilder(typ string, b LogBuilder)
MustRegisterLogBuilder panics on error.
func MustRegisterMetricsBuilder ¶
func MustRegisterMetricsBuilder(typ string, b MetricsBuilder)
MustRegisterMetricsBuilder panics on error.
func MustRegisterRegistryAction ¶
func MustRegisterRegistryAction(typ string, a RegistryAction)
MustRegisterRegistryAction panics on error.
func MustRegisterScriptEngineBuilder ¶
func MustRegisterScriptEngineBuilder(typ string, b ScriptEngineBuilder)
MustRegisterScriptEngineBuilder panics on error.
func MustRegisterServerBuilder ¶
func MustRegisterServerBuilder(typ string, b ServerBuilder)
MustRegisterServerBuilder panics on error. Intended for init().
func MustRegisterStorageBuilder ¶
func MustRegisterStorageBuilder(typ string, b StorageBuilder)
MustRegisterStorageBuilder panics on error.
func MustRegisterTracerBuilder ¶
func MustRegisterTracerBuilder(typ string, b TracerBuilder)
MustRegisterTracerBuilder panics on error.
func MustRegisterWorkflowBuilder ¶
func MustRegisterWorkflowBuilder(typ string, b WorkflowBuilder)
MustRegisterWorkflowBuilder panics on error.
func NewRootCmd ¶
NewRootCmd creates the root cobra command with the standard bootstrap flags. The runE function is called after flags are parsed.
func RegisterAiBuilder ¶
RegisterAiBuilder registers an AI builder for the given type string.
func RegisterBrokerBuilder ¶
func RegisterBrokerBuilder(typ string, b BrokerBuilder) error
RegisterBrokerBuilder registers a broker builder for the given type string.
func RegisterCacheBuilder ¶
func RegisterCacheBuilder(typ string, b CacheBuilder) error
RegisterCacheBuilder registers a cache builder for the given type string.
func RegisterConfigAction ¶
func RegisterConfigAction(typ string, a ConfigAction) error
RegisterConfigAction registers a config action for the given type string.
func RegisterDatabaseBuilder ¶
func RegisterDatabaseBuilder(typ string, b DatabaseBuilder) error
RegisterDatabaseBuilder registers a database builder for the given type string.
func RegisterLogBuilder ¶
func RegisterLogBuilder(typ string, b LogBuilder) error
RegisterLogBuilder registers a log builder for the given type string.
func RegisterMetricsBuilder ¶
func RegisterMetricsBuilder(typ string, b MetricsBuilder) error
RegisterMetricsBuilder registers a metrics builder for the given type string.
func RegisterRegistryAction ¶
func RegisterRegistryAction(typ string, a RegistryAction) error
RegisterRegistryAction registers a registry action for the given type string.
func RegisterScriptEngineBuilder ¶
func RegisterScriptEngineBuilder(typ string, b ScriptEngineBuilder) error
RegisterScriptEngineBuilder registers a script engine builder for the given type string.
func RegisterServerBuilder ¶
func RegisterServerBuilder(typ string, b ServerBuilder) error
RegisterServerBuilder registers a server builder for the given type string.
func RegisterStorageBuilder ¶
func RegisterStorageBuilder(typ string, b StorageBuilder) error
RegisterStorageBuilder registers a storage builder for the given type string.
func RegisterTracerBuilder ¶
func RegisterTracerBuilder(typ string, b TracerBuilder) error
RegisterTracerBuilder registers a tracer builder for the given type string.
func RegisterWorkflowBuilder ¶
func RegisterWorkflowBuilder(typ string, b WorkflowBuilder) error
RegisterWorkflowBuilder registers a workflow builder for the given type string.
func Run ¶
func Run(ctx context.Context, cfg *v1.BootstrapConfig) error
Run is a convenience function that calls Bootstrap and then wind.App.Run. It is intended for simple use cases where broker instances are not needed; for more control, use Bootstrap or BootstrapWithContext directly.
func RunApp ¶
RunApp is the sealed one-call entry point. It:
- Creates a signal-aware context (SIGINT/SIGTERM)
- Loads config from the given file path
- Bootstraps the application
- Runs the app and cleans up on exit
This is the simplest way to start an application:
func main() {
if err := bootstrap.RunApp("config.yaml"); err != nil {
log.Fatal(err)
}
}
func RunAppWithFlags ¶
func RunAppWithFlags(flags *CommandFlags, opts ...func(root *cobra.Command)) error
RunAppWithFlags creates a cobra root command that loads config from the --conf flag and runs the application. It allows further customisation of the root command (adding sub-commands, extra flags, etc.).
Usage:
func main() {
flags := bootstrap.NewCommandFlags()
if err := bootstrap.RunAppWithFlags(flags); err != nil {
os.Exit(1)
}
}
Types ¶
type AiBuilder ¶
AiBuilder builds an AI model client and returns it along with an optional cleanup function.
type BrokerBuilder ¶
BrokerBuilder builds a broker instance and returns it along with an optional cleanup function. The returned instance (any) is the concrete broker object that callers can use for Publish/Subscribe operations.
The type key (e.g. "kafka", "rabbitmq") is used to look up the instance via Context.Broker after bootstrap.
type CacheBuilder ¶
CacheBuilder builds a cache instance and returns it along with an optional cleanup function.
type CommandFlags ¶
type CommandFlags struct {
// Conf is the path to the bootstrap config file.
// Supported formats: .yaml, .yml, .json, .bin, .pb.
Conf string
}
CommandFlags holds the CLI flags consumed by the bootstrap framework.
func NewCommandFlags ¶
func NewCommandFlags() *CommandFlags
NewCommandFlags returns a CommandFlags with sensible defaults.
func (*CommandFlags) AddFlags ¶
func (f *CommandFlags) AddFlags(cmd *cobra.Command)
AddFlags binds the flags to the given cobra command.
type ConfigAction ¶
ConfigAction performs config source loading/watching.
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
Context holds the application lifecycle state created by Bootstrap or BootstrapWithContext.
It is safe to read fields from multiple goroutines after Bootstrap returns.
func BootstrapWithContext ¶
BootstrapWithContext is like Bootstrap but returns a *Context that wraps the app, config, broker instances, cleanup, and a cancellable context.
The caller should call ctx.Cleanup() after the app stops. Use ctx.Broker(name) to retrieve a specific broker instance.
func (*Context) Ai ¶
Ai returns the AI model client instance for the given type name (e.g. AiTypeOpenAI, AiTypeLangChainGo, AiTypeEino). Returns nil if no AI client with that name was configured.
The caller should type-assert the result to the concrete client type:
client, ok := ctx.Ai(bootstrap.AiTypeOpenAI).(*openai.Client)
if ok { /* use client for chat completions */ }
func (*Context) Ais ¶
Ais returns all AI client instances as a map keyed by type name. Returns nil if no AI client was configured.
func (*Context) Broker ¶
Broker returns the broker instance for the given type name (e.g. BrokerTypeKafka, BrokerTypeRabbitMQ). Returns nil if no broker with that name was configured.
The caller should type-assert the result to the concrete broker type:
if b, ok := ctx.Broker(bootstrap.BrokerTypeKafka).(*kafka.Broker); ok {
b.Publish(ctx, msg)
}
func (*Context) Brokers ¶
Brokers returns all broker instances as a map keyed by type name. Returns nil if no broker was configured.
func (*Context) Cache ¶
Cache returns the cache instance for the given type name (e.g. CacheTypeLocal, CacheTypeRedis). Returns nil if no cache with that name was configured.
The caller should type-assert the result to the concrete cache type:
c, ok := ctx.Cache(bootstrap.CacheTypeLocal).(*local.Cache)
if ok { /* use c for Get/Set operations */ }
func (*Context) Caches ¶
Caches returns all cache instances as a map keyed by type name. Returns nil if no cache was configured.
func (*Context) Cleanup ¶
func (c *Context) Cleanup()
Cleanup releases all resources. It is safe to call multiple times.
func (*Context) Config ¶
func (c *Context) Config() *v1.BootstrapConfig
Config returns the loaded bootstrap configuration.
func (*Context) Database ¶
Database returns the database client instance for the given type name (e.g. DatabaseTypeGorm, DatabaseTypeMongodb). Returns nil if no database client with that name was configured.
func (*Context) Databases ¶
Databases returns all database client instances as a map keyed by type name. Returns nil if no database was configured.
func (*Context) ScriptEngine ¶
ScriptEngine returns the script engine instance for the given type name (e.g. ScriptEngineLua, ScriptEngineJavaScript). Returns nil if no script engine with that name was configured.
The caller should type-assert the result to the concrete engine type:
eng, ok := ctx.ScriptEngine(bootstrap.ScriptEngineLua).(scriptEngine.Engine)
if ok { /* use eng for Eval/Execute */ }
func (*Context) ScriptEngines ¶
ScriptEngines returns all script engine instances as a map keyed by type name. Returns nil if no script engine was configured.
func (*Context) Storage ¶
Storage returns the storage client instance for the given type name (e.g. StorageTypeMinio, StorageTypeS3). Returns nil if no storage with that name was configured.
The caller should type-assert the result to the concrete storage type:
s, ok := ctx.Storage(bootstrap.StorageTypeMinio).(*minioPlugin.Storage)
if ok { /* use s for PutObject/GetObject */ }
func (*Context) Storages ¶
Storages returns all storage instances as a map keyed by type name. Returns nil if no storage was configured.
func (*Context) Workflow ¶
Workflow returns the workflow engine client instance for the given type name (e.g. WorkflowTypeTemporal, WorkflowTypeArgo). Returns nil if no workflow client with that name was configured.
The caller should type-assert the result to the concrete client type:
wc, ok := ctx.Workflow(bootstrap.WorkflowTypeTemporal).(*temporal.WorkflowClient)
if ok { /* use wc for workflow operations */ }
type DatabaseBuilder ¶
DatabaseBuilder builds a database client instance and returns it along with an optional cleanup function.
type LogBuilder ¶
LogBuilder builds a log.Logger from a [Logger] config.
type MetricsBuilder ¶
MetricsBuilder builds a metrics backend.
type RegistryAction ¶
type RegistryAction func(ctx context.Context, appCfg *v1.App, endpoints []string, cfg *v1.Registry) (func(), error)
RegistryAction performs registration/deregistration lifecycle.
The cfg parameter carries the full registry configuration so that the action can extract its own sub-configuration. Deprecated: Use RegisterRegistryAction with the new signature instead.
type ScriptEngineBuilder ¶
ScriptEngineBuilder builds a script engine instance and returns it along with an optional cleanup function.
type ServerBuilder ¶
ServerBuilder builds a transport.Server from a [Server] config.
type StorageBuilder ¶
StorageBuilder builds a storage client instance and returns it along with an optional cleanup function. The returned instance (any) is the concrete storage client that callers can use for object operations.
The type key (e.g. "minio", "s3") is used to look up the instance via Context.Storage after bootstrap.
type TracerBuilder ¶
TracerBuilder builds a tracer provider.