faucet

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RouteFaucetHealth is the route to get the health info of the faucet.
	RouteFaucetHealth = "/health"

	// RouteFaucetInfo is the route to give info about the faucet address.
	// GET returns address, balance, bech32Hrp and tokenName of the faucet.
	RouteFaucetInfo = "/info"

	// RouteFaucetEnqueue is the route to tell the faucet to pay out some funds to the given address.
	// POST enqueues a new request.
	RouteFaucetEnqueue = "/enqueue"
)

Variables

View Source
var (
	Component *app.Component
)
View Source
var ParamsFaucet = &ParametersFaucet{
	MaxOutputCount: iotago.MaxOutputsCount,
}

Functions

This section is empty.

Types

type ParametersFaucet

type ParametersFaucet struct {
	Amount            uint64        `default:"1000000000" usage:"the amount of funds the requester receives"`
	SmallAmount       uint64        `` /* 152-byte string literal not displayed */
	MaxAddressBalance uint64        `default:"2000000000" usage:"the maximum allowed amount of funds on the target address"`
	MaxOutputCount    int           `usage:"the maximum output count per faucet message"`
	TagMessage        string        `default:"HORNET FAUCET" usage:"the faucet transaction tag payload"`
	BatchTimeout      time.Duration `default:"2s" usage:"the maximum duration for collecting faucet batches"`
	BindAddress       string        `default:"localhost:8091" usage:"the bind address on which the faucet website can be accessed from"`
	RateLimit         struct {
		Enabled     bool          `default:"true" usage:"whether the rate limiting should be enabled"`
		Period      time.Duration `default:"5m" usage:"the period for rate limiting"`
		MaxRequests int           `default:"10" usage:"the maximum number of requests per period"`
		MaxBurst    int           `default:"20" usage:"additional requests allowed in the burst period"`
	}
	// DebugRequestLoggerEnabled defines whether the debug logging for requests should be enabled
	DebugRequestLoggerEnabled bool `default:"false" usage:"whether the debug logging for requests should be enabled"`
}

Jump to

Keyboard shortcuts

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