Documentation ¶
Index ¶
- Variables
- func Display(cmd *cobra.Command, v any, prettyFormatter FormatFn) error
- func Execute(ctx context.Context)
- func GoFormat(w io.Writer, v any) error
- func JSONFormat(w io.Writer, v any) error
- func StartServer(ctx context.Context, cfg Config, migrate, spawnWorker bool) error
- func StartWorkers(ctx context.Context, cfg Config) error
- func TOMLFormat(w io.Writer, v any) error
- func YAMLFormat(w io.Writer, v any) error
- type Config
- type FormatFn
- type RunEFunc
- type ServeConfig
- type SyncerConf
- type WorkerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var PaginationSizeDefault, PaginationPageDefault int32
Functions ¶
func Display ¶ added in v0.1.24
Display formats the given value 'v' using format specified as value for --format flag and writes to STDOUT. If --format=pretty/human, custom-formatter passed will be used.
func JSONFormat ¶ added in v0.1.24
JSONFormat outputs 'v' formatted as indented JSON.
func StartServer ¶ added in v0.1.26
func TOMLFormat ¶ added in v0.1.24
TOMLFormat outputs 'v' formatted as per TOML spec.
Types ¶
type Config ¶
type Config struct { Log logger.LogConfig `mapstructure:"log"` Syncer SyncerConf `mapstructure:"syncer"` Service ServeConfig `mapstructure:"service"` PGConnStr string `mapstructure:"pg_conn_str" default:"postgres://postgres@localhost:5432/entropy?sslmode=disable"` Telemetry telemetry.Config `mapstructure:"telemetry"` }
Config contains the application configuration.
type ServeConfig ¶ added in v0.1.26
type ServeConfig struct { Host string `mapstructure:"host" default:""` Port int `mapstructure:"port" default:"8080"` HTTPAddr string `mapstructure:"http_addr" default:":8081"` PaginationSizeDefault int32 `mapstructure:"pagination_size_default" default:"0"` PaginationPageDefault int32 `mapstructure:"pagination_page_default" default:"1"` }
type SyncerConf ¶ added in v0.1.26
type SyncerConf struct { SyncInterval time.Duration `mapstructure:"sync_interval" default:"1s"` RefreshInterval time.Duration `mapstructure:"refresh_interval" default:"3s"` ExtendLockBy time.Duration `mapstructure:"extend_lock_by" default:"5s"` SyncBackoffInterval time.Duration `mapstructure:"sync_backoff_interval" default:"5s"` MaxRetries int `mapstructure:"max_retries" default:"5"` Workers map[string]WorkerConfig `mapstructure:"workers" default:"[]"` }
type WorkerConfig ¶ added in v0.1.26
Click to show internal directories.
Click to hide internal directories.