component

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 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

Overview

Package component provides object storage lifecycle integration for bootstrap.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Component

func Component() bootstrap.IComponent

Component wraps loadFromEnv as a bootstrap.IComponent. Close is a no-op: the S3 client holds no resources that need releasing.

Example

ExampleComponent shows how Component() is used in a bootstrap registration chain. It reads the storage.* keys from env during Init() and stores the result in storage.Default(). Init fails when a required key is empty or still "TOBE_REPLACED"; it does not contact the store, so call storage.Default().Check to test connectivity.

bootstrap.New().
    Add(envComp.Component("config/app.toml", &configFS)).
    Add(logComp.Component()).
    Add(storageComp.Component()).
    Run()
package main

import (
	"fmt"

	storageComp "github.com/phcp-tech/common-library-golang/storage/component"
)

func main() {
	c := storageComp.Component()
	fmt.Println(c.Name())
}
Output:
storage

Types

This section is empty.

Jump to

Keyboard shortcuts

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