server

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 11 Imported by: 1

Documentation

Overview

Package server provides functions to set a webhook and start a server to process incoming requests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHttpHandlerForWebhook

func AddHttpHandlerForWebhook(bot *tgbotapi.BotAPI, appParams *app.Params, wg *sync.WaitGroup)

AddHttpHandlerForWebhook uses http.HandleFunc to add a global route to the server.

func Start

func Start(port string) *http.Server

Start a server listening on the specified port.

func StopListeningForIncomingRequests

func StopListeningForIncomingRequests(srv *http.Server)

StopListeningForIncomingRequests stops the server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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