Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31a21ad695
|
||
|
|
abeefd9810
|
@@ -1,6 +1,6 @@
|
||||
# einherjar/storage-minio
|
||||
|
||||
[](https://code.nochebuena.dev/einherjar/storage-minio)
|
||||
[](https://code.nochebuena.dev/einherjar/storage-minio)
|
||||
[](LICENSE)
|
||||
[](https://go.dev)
|
||||
[]()
|
||||
@@ -19,8 +19,9 @@
|
||||
import storageminio "code.nochebuena.dev/einherjar/storage-minio"
|
||||
|
||||
s := storageminio.New(logger, storageminio.DefaultConfig())
|
||||
launcher.Append(s) // OnInit connects; OnStop is a no-op (stateless client)
|
||||
health.Register(s) // BucketExists check; LevelCritical
|
||||
lc.Append(s) // OnInit connects; OnStop is a no-op (stateless client)
|
||||
// s is observability.Checkable (BucketExists check, LevelCritical):
|
||||
srv.Get("/health", health.NewHandler(logger, s).ServeHTTP)
|
||||
```
|
||||
|
||||
### Uploading
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
// - OnStart: verifies the configured bucket exists; creates it if absent.
|
||||
// - OnStop: releases the client reference.
|
||||
//
|
||||
// Register with the launcher and health aggregator before starting:
|
||||
// Append to a launcher, and wire a health endpoint (mc satisfies
|
||||
// [observability.Checkable]):
|
||||
//
|
||||
// mc := minio.New(logger, cfg)
|
||||
// launcher.Register(mc)
|
||||
// health.Register(mc)
|
||||
// lc.Append(mc) // lifecycle: OnInit → OnStart → OnStop
|
||||
// srv.Get("/health", health.NewHandler(logger, mc).ServeHTTP)
|
||||
//
|
||||
// # Operations
|
||||
//
|
||||
|
||||
@@ -3,8 +3,8 @@ module code.nochebuena.dev/einherjar/storage-minio
|
||||
go 1.26
|
||||
|
||||
require (
|
||||
code.nochebuena.dev/einherjar/contracts v1.1.0
|
||||
code.nochebuena.dev/einherjar/core v1.1.0
|
||||
code.nochebuena.dev/einherjar/contracts v1.1.1
|
||||
code.nochebuena.dev/einherjar/core v1.1.1
|
||||
github.com/minio/minio-go/v7 v7.1.0
|
||||
)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
code.nochebuena.dev/einherjar/contracts v1.1.0 h1:GsGr6reyrd9qCc7D8CqbT1LWPTeeK9lT4r4EdsNA5Ro=
|
||||
code.nochebuena.dev/einherjar/contracts v1.1.0/go.mod h1:ccltUtrFb5+MEJdkx2VVEUL+xC5pupVlVVsMM8AlCWI=
|
||||
code.nochebuena.dev/einherjar/core v1.1.0 h1:zxj9bFPthEEFRnvWV/vgNZqWa2y/kAo3p5pODWablyk=
|
||||
code.nochebuena.dev/einherjar/core v1.1.0/go.mod h1:Ot2JbjsnZ33Ed5C9Ev1kSn2PW+F4dLz/LRwIUh+fYt0=
|
||||
code.nochebuena.dev/einherjar/contracts v1.1.1 h1:MRQUR8Q1D4wIOUIz11vpAdsapWqFTMwr0/VRvWbGO3s=
|
||||
code.nochebuena.dev/einherjar/contracts v1.1.1/go.mod h1:ccltUtrFb5+MEJdkx2VVEUL+xC5pupVlVVsMM8AlCWI=
|
||||
code.nochebuena.dev/einherjar/core v1.1.1 h1:W6V/Peh1ffWjqZnBuBQLn4UGM+bgvWt9MQuktTEfDFw=
|
||||
code.nochebuena.dev/einherjar/core v1.1.1/go.mod h1:ninuZlnO178zC4rOdt5vjGojnlOpygP8cDorrecAeTY=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
|
||||
Reference in New Issue
Block a user