appconfig

package
v0.0.0-...-9c552bb Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Instance     *AppConfig
	RawVersion   string
	MajorVersion string
	BuiltAt      string
	MinorVersion string
	Beta         bool
)
View Source
var VersionRegex = regexp.MustCompile(`v(\d\.\d\d?)[-|\.](beta)?(\d?\d?)`)

Functions

func Init

func Init(containerized bool, dockerHubID string) error

func Read

func Read(configSourceStr string, containerizedRun bool, configNotFoundErrMsg string, appName string) error

Read reads config from configSourceStr that might be (HTTP URL or path to YAML/JSON file or plain JSON string) replaces all ${env.VAR} placeholders with OS variables configSourceStr might be overridden by "config_location" ENV variable returns err if occurred

Types

type AppConfig

type AppConfig struct {
	ServerName string
	Authority  string
	ConfigPath string

	ConfiguratorURL   string
	ConfiguratorToken string

	DisableSkipEventsWarn bool

	EmptyGIFPixelOnexOne []byte

	UaResolver           useragent.Resolver
	AuthorizationService *authorization.Service

	GlobalDDLLogsWriter   io.Writer
	GlobalQueryLogsWriter io.Writer
	SingerLogsWriter      io.Writer
	AirbyteLogsWriter     io.Writer
	SourcesLogsWriter     io.Writer

	GlobalUniqueIDField   *identifiers.UniqueID
	EnrichWithHTTPContext bool
	// contains filtered or unexported fields
}

AppConfig is a main Application Global Configuration

func (*AppConfig) Close

func (a *AppConfig) Close()

func (*AppConfig) CloseEventsConsumers

func (a *AppConfig) CloseEventsConsumers()

CloseEventsConsumers closes events queues(streaming) and loggers(batch) in the last call for preventing losing events

func (*AppConfig) CloseLast

func (a *AppConfig) CloseLast()

CloseLast closes meta.Storage, coordinationService closers in the last call

func (*AppConfig) CloseWriteAheadLog

func (a *AppConfig) CloseWriteAheadLog()

CloseWriteAheadLog closes write-ahead-log service in the last call

func (*AppConfig) ScheduleClosing

func (a *AppConfig) ScheduleClosing(c io.Closer)

func (*AppConfig) ScheduleEventsConsumerClosing

func (a *AppConfig) ScheduleEventsConsumerClosing(c io.Closer)

ScheduleEventsConsumerClosing adds events consumer closer into slice for closing

func (*AppConfig) ScheduleLastClosing

func (a *AppConfig) ScheduleLastClosing(c io.Closer)

ScheduleLastClosing adds meta.Storage, coordinationService closers

func (*AppConfig) ScheduleWriteAheadLogClosing

func (a *AppConfig) ScheduleWriteAheadLogClosing(c io.Closer)

ScheduleWriteAheadLogClosing adds wal.Service closer

type VersionReminder

type VersionReminder struct {
	// contains filtered or unexported fields
}

func NewVersionReminder

func NewVersionReminder(ctx context.Context) *VersionReminder

func (*VersionReminder) Close

func (vn *VersionReminder) Close() error

func (*VersionReminder) Start

func (vn *VersionReminder) Start()

Jump to

Keyboard shortcuts

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