proxy

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrQueueDisabled = errors.New("queue is disabled")
)

Functions

This section is empty.

Types

type Gateway

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

func NewGateway

func NewGateway(opts Options, services *services.Services) *Gateway

func (*Gateway) Handle

func (g *Gateway) Handle(w http.ResponseWriter, r *http.Request)

func (*Gateway) HandleMessages added in v0.8.0

func (g *Gateway) HandleMessages(ctx context.Context, messages []*queue.Message) error

func (*Gateway) Name added in v1.0.1

func (g *Gateway) Name() string

func (*Gateway) Start

func (g *Gateway) Start() error

Start starts an HTTP server

func (*Gateway) Stop

func (g *Gateway) Stop(ctx context.Context) error

Stop stops the HTTP server

type HttpError added in v1.0.1

type HttpError struct {
	Code    int
	Message string
	Err     error
}

func (*HttpError) Error added in v1.0.1

func (e *HttpError) Error() string

type Options added in v0.8.0

type Options struct {
	Cfg         *modules.ProxyConfig
	Middlewares []mux.MiddlewareFunc
	DB          *db.DB
	Dispatcher  *dispatcher.Dispatcher
}

type Response added in v1.0.1

type Response struct {
	Headers map[string]string
	Code    int
	Body    []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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