httpmedian

package
v0.0.0-...-d3ce61e Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: LGPL-2.1 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a client for the httpmedian service.

func NewClient

func NewClient(config *Config) *Client

NewClient creates a new Client with the given Config.

func (*Client) Calculate

func (c *Client) Calculate(ctx context.Context, requests []*http.Request) *http.Request

Calculate calculates the median of the given requests and returns the result.

type Config

type Config struct {
	// Logger is the logger to use.
	Logger Logger
}

Config is the configuration for a Client.

type Logger

type Logger interface {
	// Log logs the given message.
	Log(msg string)
}

Logger is the interface for a logger.

Jump to

Keyboard shortcuts

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