options

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 2 more Imports: 4 Imported by: 0

Documentation

Overview

Package options contains flags and options for initializing an apiserver

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CleanOptions

type CleanOptions struct {
	MaxReserveDays int `json:"max-reserve-days" mapstructure:"max-reserve-days"`
}

CleanOptions defines options for clean watcher.

type Options

type Options struct {
	HealthCheckPath    string                       `json:"health-check-path"    mapstructure:"health-check-path"`
	HealthCheckAddress string                       `json:"health-check-address" mapstructure:"health-check-address"`
	MySQLOptions       *genericoptions.MySQLOptions `json:"mysql"                mapstructure:"mysql"`
	RedisOptions       *genericoptions.RedisOptions `json:"redis"                mapstructure:"redis"`
	WatcherOptions     *WatcherOptions              `json:"watcher"              mapstructure:"watcher"`
	Log                *log.Options                 `json:"log"                  mapstructure:"log"`
}

Options runs a pumpserver.

func NewOptions

func NewOptions() *Options

NewOptions creates a new Options object with default parameters.

func (*Options) Flags

func (o *Options) Flags() (fss cliflag.NamedFlagSets)

Flags returns flags for a specific APIServer by section name.

func (*Options) String

func (o *Options) String() string

func (*Options) Validate

func (o *Options) Validate() []error

Validate checks Options and return a slice of found errs.

type TaskOptions

type TaskOptions struct {
	MaxInactiveDays int `json:"max-inactive-days" mapstructure:"max-inactive-days"`
}

TaskOptions defines options for task watcher.

type WatcherOptions

type WatcherOptions struct {
	Clean CleanOptions `json:"clean" mapstructure:"clean"`
	Task  TaskOptions  `json:"task"  mapstructure:"task"`
}

WatcherOptions defines options for watchers.

Jump to

Keyboard shortcuts

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