config

package
v0.0.0-...-d386c04 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttemptBucket

type AttemptBucket struct {
	Offset   int64 `json:"offset" yaml:"offset" mapstructure:"offset"`
	Duration int64 `json:"duration" yaml:"duration" mapstructure:"duration"`
}

func (*AttemptBucket) Validate

func (conf *AttemptBucket) Validate(prefix string) error

type AttemptConsumer

type AttemptConsumer struct {
	Timeout       int64 `json:"timeout" yaml:"timeout" mapstructure:"timeout"`
	BatchSize     int   `json:"batch_size" yaml:"batch_size" mapstructure:"batch_size"`
	ScheduleDelay int   `json:"schedule_delay" yaml:"schedule_delay" mapstructure:"schedule_delay"`
}

func (*AttemptConsumer) Validate

func (conf *AttemptConsumer) Validate() error

type AttemptCronjob

type AttemptCronjob struct {
	Scheduler string          `json:"scheduler" yaml:"scheduler" mapstructure:"scheduler"`
	Timeout   int64           `json:"timeout" yaml:"timeout" mapstructure:"timeout"`
	BatchSize int             `json:"batch_size" yaml:"batch_size" mapstructure:"batch_size"`
	Buckets   []AttemptBucket `json:"buckets" yaml:"buckets" mapstructure:"buckets"`
}

func (*AttemptCronjob) Validate

func (conf *AttemptCronjob) Validate() error

type AttemptEndeavor

type AttemptEndeavor struct {
	Concurrency int `json:"concurrency" yaml:"concurrency" mapstructure:"concurrency"`
	RetryDelay  int `json:"retry_delay" yaml:"retry_delay" mapstructure:"retry_delay"`
}

func (*AttemptEndeavor) Validate

func (conf *AttemptEndeavor) Validate() error

type AttemptSelector

type AttemptSelector struct {
	Timeout   int64 `json:"timeout" yaml:"timeout" mapstructure:"timeout"`
	BatchSize int   `json:"batch_size" yaml:"batch_size" mapstructure:"batch_size"`
	Counter   int   `json:"counter" yaml:"counter" mapstructure:"counter"`
}

func (*AttemptSelector) Validate

func (conf *AttemptSelector) Validate() error

type AttemptTrigger

type AttemptTrigger struct {
	Scheduler string          `json:"scheduler" yaml:"scheduler" mapstructure:"scheduler"`
	Timeout   int64           `json:"timeout" yaml:"timeout" mapstructure:"timeout"`
	Buckets   []AttemptBucket `json:"buckets" yaml:"buckets" mapstructure:"buckets"`
}

func (*AttemptTrigger) Validate

func (conf *AttemptTrigger) Validate() error

type Config

type Config struct {
	Cronjob  AttemptCronjob  `json:"cronjob" yaml:"cronjob" mapstructure:"cronjob"`
	Consumer AttemptConsumer `json:"consumer" yaml:"consumer" mapstructure:"consumer"`
	Trigger  AttemptTrigger  `json:"trigger" yaml:"trigger" mapstructure:"trigger"`
	Selector AttemptSelector `json:"selector" yaml:"selector" mapstructure:"selector"`
	Endeavor AttemptEndeavor `json:"endeavor" yaml:"endeavor" mapstructure:"endeavor"`
}

func New

func New(provider configuration.Provider) (*Config, error)

func (*Config) Validate

func (conf *Config) Validate() error

type Wrapper

type Wrapper struct {
	Attempt Config `json:"attempt" yaml:"attempt" mapstructure:"attempt"`
}

func (*Wrapper) Validate

func (conf *Wrapper) Validate() error

Jump to

Keyboard shortcuts

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