mirror

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v0.9.0

func Init() error

Init registers the mirror middleware.

Types

type Middleware added in v0.10.0

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

Middleware is a middleware that mirrors requests to another service.

func NewMiddleware

func NewMiddleware(options Options) *Middleware

NewMiddleware creates a new MirrorMiddleware instance.

func (*Middleware) Run added in v0.10.0

func (m *Middleware) Run()

Run starts the worker that processes mirrored requests.

func (*Middleware) ServeHTTP added in v0.10.0

func (m *Middleware) ServeHTTP(ctx context.Context, c *app.RequestContext)

type Options

type Options struct {
	ServiceID string `mapstructure:"service_id"`
	QueueSize int64  `mapstructure:"queue_size"`
}

Options defines the configuration for the mirror middleware.

Jump to

Keyboard shortcuts

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