handler

package
v0.0.0-...-c99049f Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: Unlicense Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPage

func DefaultPage(w http.ResponseWriter, r *http.Request)

func GetfromHTMLData

func GetfromHTMLData(data *[]byte, nameInHTML []byte) string

func SetupHttpHandlers

func SetupHttpHandlers(mux *http.ServeMux, cancel_on_http context.CancelFunc, natsHandler NatsHanlder, cache *gcache.Cache)

Types

type HttpClient

type HttpClient struct {
	// contains filtered or unexported fields
}

func (*HttpClient) Run

func (s *HttpClient) Run(addres string, port string, natsHandler NatsHanlder, cache *gcache.Cache) error

Запуск http Клиента

type NatsHanlder

type NatsHanlder struct {
	ClientName       string
	NatsConnection   *nats.Conn
	JetstreamContext *nats.JetStreamContext

	DelChannel chan *nats.Msg
	PutChannel chan *nats.Msg
	GetChannel chan *nats.Msg
	AllChannel chan *nats.Msg
	// contains filtered or unexported fields
}

func (*NatsHanlder) CloseJetstreamHandler

func (nh *NatsHanlder) CloseJetstreamHandler()

func (*NatsHanlder) InitJetstreamHandler

func (nh *NatsHanlder) InitJetstreamHandler(mute *sync.Mutex) error

инициализация NATS Jetstream хэндлера для клиента

type ShutdownHandler

type ShutdownHandler struct {
	// contains filtered or unexported fields
}

func (ShutdownHandler) ServeHTTP

func (sht ShutdownHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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