batch

package
v0.17.4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 5 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 `yaml:"enabled"`
	Max             int  `yaml:"max"`
	RejectOnFailure bool `yaml:"reject_on_failure"`
}

func DefaultConfig added in v0.17.0

func DefaultConfig() Config

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