core

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 34 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllPluginConfig

type AllPluginConfig struct {
	Home               boot.Config                `yaml:"home" json:"home"`
	BoltDB             boltdb.Config              `yaml:"boltdb" json:"boltDb"`
	EventStore         eventstore.Config          `yaml:"eventstore" json:"eventstore"`
	CLIDaemon          clidaemon.Config           `yaml:"cliDaemon" json:"cliDaemon"`
	Logging            loglevel.Config            `yaml:"logging" json:"logging"`
	NATS               nats.Config                `yaml:"nats" json:"nats"`
	Etcd               etcd.Config                `yaml:"etcd" json:"etcd"`
	RestJWT            restjwt.Config             `yaml:"restJwt" json:"restJwt"`
	HeartbeatConsumer  heartbeat_consumer.Config  `yaml:"heartbeatConsumer" json:"heartbeatConsumer"`
	HeartbeatPublisher heartbeat_publisher.Config `yaml:"heartbeatPublisher" json:"heartbeatPublisher"`
	Kafka              kafka.Config               `yaml:"kafka" json:"kafka"`
	Postgres           postgres.Config            `yaml:"postgres" json:"postgres"`
	GitHelper          githelper.Config           `yaml:"gitHelper" json:"gitHelper"`
	PostgresCrud       postgres_crud.Config       `yaml:"postgresCrud" json:"postgresCrud"`
	Prometheus         prometheus.Config          `yaml:"prometheus" json:"prometheus"`
	REST               rest.Config                `yaml:"rest" json:"rest"`
	S3File             s3file.Config              `yaml:"s3File" json:"s3File"`
	Slack              slack.Config               `yaml:"slack" json:"slack"`
	Telegram           telegram.Config            `yaml:"telegram" json:"telegram"`
	Usermanager        usermanager.Config         `yaml:"usermanager" json:"usermanager"`
}

type Core

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

func NewCore

func NewCore(bootConf interface{}, flags interface{}) *Core

func NewMinimalCore

func NewMinimalCore(flags ...interface{}) *Core

func (*Core) CLI

func (c *Core) CLI(f any)

func (*Core) CustomConfig

func (c *Core) CustomConfig(name string, conf interface{})

func (*Core) ID

func (c *Core) ID() string

func (*Core) Logger

func (c *Core) Logger() *logrus.Entry

func (*Core) MachineID added in v1.11.0

func (c *Core) MachineID() (string, error)

func (*Core) MustGet

func (c *Core) MustGet(name string) plugins.Plugin

func (*Core) Register

func (c *Core) Register(plugins ...plugins.Plugin) *Core

func (*Core) SendSigIntSignal

func (c *Core) SendSigIntSignal()

func (*Core) SetLogLevel

func (c *Core) SetLogLevel(conf loglevel.Config) *Core

func (*Core) Shutdown

func (c *Core) Shutdown(f func())

func (*Core) StartPlugins

func (c *Core) StartPlugins()

func (*Core) WaitOnCleanup

func (c *Core) WaitOnCleanup() <-chan bool

func (*Core) WithAllPlugins

func (c *Core) WithAllPlugins(config AllPluginConfig) *Core

func (*Core) WithMinimalPlugins

func (c *Core) WithMinimalPlugins() *Core

func (*Core) WithOptions

func (c *Core) WithOptions(bootConf interface{}, coreOptions ...Option) *Core

type MinimalPluginConfig

type MinimalPluginConfig struct {
	Home      boot.Config      `yaml:"home" json:"home"`
	CLIDaemon clidaemon.Config `yaml:"cliDaemon" json:"cliDaemon"`
	Logging   loglevel.Config  `yaml:"logging" json:"logging"`
}

type Option

type Option func(c *Core, conf interface{}) error

func CLIShutdownFunc added in v1.15.0

func CLIShutdownFunc(f func()) Option

func LoadConfigFromEnvironment added in v1.15.1

func LoadConfigFromEnvironment(yamlFile string, service string, url string) Option

func LoadConfigurator

func LoadConfigurator(service string, url string) Option

func LoadEnv added in v1.17.0

func LoadEnv() Option

func LoadKafkaConfigurator added in v1.16.0

func LoadKafkaConfigurator(brokers string, topic string, updateFn UpdateFn) Option

func LoadOptionalYamlConfig added in v1.15.3

func LoadOptionalYamlConfig(filename string) Option

func LoadYamlConfig

func LoadYamlConfig(filename string) Option

type UpdateFn added in v1.16.0

type UpdateFn func(cfg string) error

Jump to

Keyboard shortcuts

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