config

package
v0.0.0-...-63d1355 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 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 {
	BrokerQueueSz int      `json:"broker_queue_sz" yaml:"broker_queue_sz" env:"BROKER_QUEUE_SIZE" default:"10"`
	Telegram      Telegram `json:"telegram" yaml:"telegram"`
}

func FromEnv

func FromEnv() (*Config, error)

func FromFile

func FromFile(name string) (*Config, error)

type Telegram

type Telegram struct {
	ReaderToken string `json:"reader_token" yaml:"reader_token" env:"TELEGRAM_READER_TOKEN"`
	WriterToken string `json:"writer_token" yaml:"writer_token" env:"TELEGRAM_WRITER_TOKEN"`
	Workers     int    `json:"workers" yaml:"workers" env:"TELEGRAM_WORKERS"`
}

Jump to

Keyboard shortcuts

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