mirror of
https://github.com/hanzoai/o11y.git
synced 2026-10-15 12:58:33 +00:00
Full rebrand of the SigNoz observability platform: - Go module: github.com/SigNoz/signoz → github.com/hanzoai/o11y - Frontend: @signozhq/* → @hanzo/o11y-*, posthog-js → @hanzo/insights - Docker: signoz/* → ghcr.io/hanzoai/o11y* - ClickHouse → Hanzo Datastore (hanzoai/datastore) - Env vars: SIGNOZ_* → HANZO_* - DB tables: signoz_* → o11y_* - All branding, URLs, docs updated - 2172 files changed
35 lines
679 B
Go
35 lines
679 B
Go
package fileprovider
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/hanzoai/o11y/pkg/config"
|
|
koanfyaml "github.com/knadh/koanf/parsers/yaml"
|
|
koanffile "github.com/knadh/koanf/providers/file"
|
|
)
|
|
|
|
const (
|
|
scheme string = "file"
|
|
)
|
|
|
|
type provider struct{}
|
|
|
|
func NewFactory() config.ProviderFactory {
|
|
return config.NewProviderFactory(New)
|
|
}
|
|
|
|
func New(config config.ProviderConfig) config.Provider {
|
|
return &provider{}
|
|
}
|
|
|
|
func (provider *provider) Scheme() string {
|
|
return scheme
|
|
}
|
|
|
|
func (provider *provider) Get(ctx context.Context, uri config.Uri) (*config.Conf, error) {
|
|
conf := config.NewConf()
|
|
err := conf.Load(koanffile.Provider(uri.Value()), koanfyaml.Parser())
|
|
|
|
return conf, err
|
|
}
|