options

package
v0.0.0-...-9b3adab Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FeatureOptions

type FeatureOptions struct {
	EnableProfiling bool `json:"profiling"      mapstructure:"profiling"`
	EnableMetrics   bool `json:"enable-metrics" mapstructure:"enable-metrics"`
}

func NewFeatureOptions

func NewFeatureOptions() *FeatureOptions

func (*FeatureOptions) AddFlags

func (o *FeatureOptions) AddFlags(fs *pflag.FlagSet)

func (*FeatureOptions) Validate

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

type InsecureServerOptions

type InsecureServerOptions struct {
	BindAddress string `json:"bind-address" mapstructure:"bind-address"`
	BindPort    int    `json:"bind-port"    mapstructure:"bind-port"`
}

func NewInsecureServingOptions

func NewInsecureServingOptions() *InsecureServerOptions

func (*InsecureServerOptions) AddFlags

func (o *InsecureServerOptions) AddFlags(fs *pflag.FlagSet)

func (*InsecureServerOptions) Validate

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

type MySQLOptions

type MySQLOptions struct {
	Host                  string        `json:"host,omitempty"                     mapstructure:"host"`
	Username              string        `json:"username,omitempty"                 mapstructure:"username"`
	Password              string        `json:"-"                                  mapstructure:"password"`
	Database              string        `json:"database"                           mapstructure:"database"`
	MaxIdleConnections    int           `json:"max-idle-connections,omitempty"     mapstructure:"max-idle-connections"`
	MaxOpenConnections    int           `json:"max-open-connections,omitempty"     mapstructure:"max-open-connections"`
	MaxConnectionLifeTime time.Duration `json:"max-connection-life-time,omitempty" mapstructure:"max-connection-life-time"`
}

MySQLOptions defines options for mysql database

func NewMySQLOptions

func NewMySQLOptions() *MySQLOptions

func (*MySQLOptions) AddFlags

func (o *MySQLOptions) AddFlags(fs *pflag.FlagSet)

func (*MySQLOptions) Validate

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

Jump to

Keyboard shortcuts

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