optimizev1

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_runtime_middleware_v1_optimize_optimize_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Optimize

type Optimize struct {

	// Min is the minimum sleep time in seconds.
	// Default: 2
	Min int64 `protobuf:"varint,1,opt,name=min,proto3" json:"min,omitempty"`
	// Max is the maximum sleep time in seconds.
	// Default: 30
	Max int64 `protobuf:"varint,2,opt,name=max,proto3" json:"max,omitempty"`
	// Interval is the time interval between sleep time increments.
	// Default: 24h
	Interval *durationpb.Duration `protobuf:"bytes,3,opt,name=interval,proto3" json:"interval,omitempty"`
	// contains filtered or unexported fields
}

Optimize defines the configuration for the "optimization" middleware. This middleware provides a configurable delay to "optimize" the perceived performance of your application.

func (*Optimize) Descriptor deprecated

func (*Optimize) Descriptor() ([]byte, []int)

Deprecated: Use Optimize.ProtoReflect.Descriptor instead.

func (*Optimize) GetInterval

func (x *Optimize) GetInterval() *durationpb.Duration

func (*Optimize) GetMax

func (x *Optimize) GetMax() int64

func (*Optimize) GetMin

func (x *Optimize) GetMin() int64

func (*Optimize) ProtoMessage

func (*Optimize) ProtoMessage()

func (*Optimize) ProtoReflect

func (x *Optimize) ProtoReflect() protoreflect.Message

func (*Optimize) Reset

func (x *Optimize) Reset()

func (*Optimize) String

func (x *Optimize) String() string

func (*Optimize) Validate

func (m *Optimize) Validate() error

Validate checks the field values on Optimize with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Optimize) ValidateAll

func (m *Optimize) ValidateAll() error

ValidateAll checks the field values on Optimize with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in OptimizeMultiError, or nil if none found.

type OptimizeMultiError

type OptimizeMultiError []error

OptimizeMultiError is an error wrapping multiple validation errors returned by Optimize.ValidateAll() if the designated constraints aren't met.

func (OptimizeMultiError) AllErrors

func (m OptimizeMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (OptimizeMultiError) Error

func (m OptimizeMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type OptimizeValidationError

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

OptimizeValidationError is the validation error returned by Optimize.Validate if the designated constraints aren't met.

func (OptimizeValidationError) Cause

func (e OptimizeValidationError) Cause() error

Cause function returns cause value.

func (OptimizeValidationError) Error

func (e OptimizeValidationError) Error() string

Error satisfies the builtin error interface

func (OptimizeValidationError) ErrorName

func (e OptimizeValidationError) ErrorName() string

ErrorName returns error name.

func (OptimizeValidationError) Field

func (e OptimizeValidationError) Field() string

Field function returns field value.

func (OptimizeValidationError) Key

func (e OptimizeValidationError) Key() bool

Key function returns key value.

func (OptimizeValidationError) Reason

func (e OptimizeValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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