config

package
v1.0.15 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	StorageConfig struct {
		Enabled                   bool   `yaml:"enabled" env-default:"true"`
		Protocol                  string `yaml:"protocol" env-default:"s3"`
		S3AccessKeyID             string `yaml:"s3AccesskeyID"`
		S3SecretAccessKey         string `yaml:"s3SecretAccessKey"`
		S3Region                  string `yaml:"s3Region"`
		S3Bucket                  string `yaml:"S3Bucket"`
		S3Endpoint                string `yaml:"S3Endpoint"`
		CFSMountPath              string `yaml:"CFSMountPath"`
		StoreDir                  string `yaml:"StoreDir"`
		PresignedURLExpireSeconds int    `yaml:"PresignedURLExpireSeconds"`
		DeleteLocalCorefile       bool   `yaml:"deleteLocalCorefile"`
	} `yaml:"StorageConfig"`
	Gc          bool   `yaml:"gc" env-default:"false"`
	GcType      string `yaml:"gc_type" env-default:"rm"`
	CorefileDir string `yaml:"CorefileDir"`

	// Notice configuration (merged from controller)
	NoticeChannel []struct {
		Chan       string `yaml:"chan"`
		Webhookurl string `yaml:"webhookurl"`
		Keyword    string `yaml:"keyword"`
	} `yaml:"NoticeChannel"`
	MessageTemplate string            `yaml:"messageTemplate"`
	MessageLabels   map[string]string `yaml:"messageLabels"`

	// CoreSight integration configuration
	CoreSight struct {
		Enabled bool   `yaml:"enabled" env-default:"false"`
		NatsURL string `yaml:"natsUrl" env:"CORESIGHT_NATS_URL"`
		Token   string `yaml:"token" env:"CORESIGHT_TOKEN"`
	} `yaml:"CoreSight"`

	// CustomHandler configuration for executing custom scripts
	CustomHandler struct {
		Enabled           bool   `yaml:"enabled"`
		Script            string `yaml:"script"`
		Timeout           int    `yaml:"timeout"`
		SkipDefaultNotify bool   `yaml:"skipDefaultNotify"`
		SkipCoreSight     bool   `yaml:"skipCoreSight"`
	} `yaml:"CustomHandler"`
}

func Get

func Get() *Config

Jump to

Keyboard shortcuts

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