Documentation ¶
Index ¶
- Variables
- func BotsReport(rootCtx context.Context, cfgs map[string]hps.BotConfig) string
- func MessageProcessor(ctx context.Context, msgQueue <-chan tg.Message, ...)
- func Poller(baseCtx context.Context, botName string, bot hps.BotConfig, ...)
- func Run(rootCtx context.Context)
- func RunHTTPServer(ctx context.Context, addr string, writeTimeout time.Duration, ...)
- func SmartSend(ctx context.Context, token, callbackID string, ...) error
- type AliveHandler
- type Handler
Constants ¶
This section is empty.
Variables ¶
View Source
var Build = "noBuildInfo" // go build -ldflags "-X github.com/michurin/cnbot/pkg/bot.Build=`date +%F`-`git rev-parse --short HEAD`" ./cmd/...
View Source
var Version = version
Functions ¶
func MessageProcessor ¶
func Run ¶
TODO split Run to make it embeddable Run has to obtain: - shutdown context - configs - logger - http client - http server
func RunHTTPServer ¶
Types ¶
type AliveHandler ¶
type AliveHandler struct{}
func (*AliveHandler) ServeHTTP ¶
func (h *AliveHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.