batch

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMaxBatchSizeTooSmall = errors.New("maximum allowed batch size cannot be smaller than 1. Protection auto-disabled")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled         bool `conf:"default:true" yaml:"enabled"`
	Max             int  `conf:"default:5" yaml:"max"`
	RejectOnFailure bool `conf:"default:true" yaml:"reject_on_failure"`
}

type MaxBatchRule

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

func NewMaxBatch

func NewMaxBatch(cfg Config) (*MaxBatchRule, error)

func (*MaxBatchRule) Validate

func (t *MaxBatchRule) Validate(payload []gql.RequestData) error

Jump to

Keyboard shortcuts

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