core

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: MIT Imports: 26 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"`
	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"`
	// TODO enable libp2p when ready
	// Libp2p             libp2p.Config              `yaml:"libp2p" json:"libp2p"`
	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"`
	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 func())

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) 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 LoadConfigurator

func LoadConfigurator(service string, url string) Option

func LoadYamlConfig

func LoadYamlConfig(filename string) Option

Jump to

Keyboard shortcuts

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