configs

package
v1.2.85 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigRetrieverOption

func DefaultConfigRetrieverOption() (option configures.RetrieverOption)

Types

type Config

type Config struct {
	Runtime   RuntimeConfig     `json:"runtime,omitempty" yaml:"runtime,omitempty"`
	Log       logs.Config       `json:"log,omitempty" yaml:"log,omitempty"`
	Cluster   clusters.Config   `json:"cluster,omitempty" yaml:"cluster,omitempty"`
	Transport transports.Config `json:"transport,omitempty" yaml:"transport,omitempty"`
	Proxy     proxies.Config    `json:"proxy,omitempty" yaml:"proxy,omitempty"`
	Services  services.Config   `json:"services,omitempty" yaml:"services,omitempty"`
	Hooks     hooks.Config      `json:"hooks,omitempty" yaml:"hooks,omitempty"`
}

func New added in v1.2.0

func New() Config

func (Config) AddService added in v1.2.0

func (config Config) AddService(name string, conf any) Config

func (Config) SetCluster added in v1.2.0

func (config Config) SetCluster(cluster clusters.Config) Config

func (Config) SetConsole added in v1.2.0

func (config Config) SetConsole(out logs.ConsoleWriterOutType) Config

func (Config) SetConsoleFormatter added in v1.2.0

func (config Config) SetConsoleFormatter(formatter logs.ConsoleFormatter) Config

func (Config) SetLoggerLevel added in v1.2.0

func (config Config) SetLoggerLevel(level logs.Level) Config

func (Config) SetTransport added in v1.2.0

func (config Config) SetTransport(transport transports.Config) Config

type ProcsConfig

type ProcsConfig struct {
	Min int `json:"min" yaml:"min,omitempty"`
}

type RuntimeConfig

type RuntimeConfig struct {
	Procs   ProcsConfig               `json:"procs,omitempty" yaml:"procs,omitempty"`
	Workers WorkersConfig             `json:"workers,omitempty" yaml:"workers,omitempty"`
	Shared  shareds.LocalSharedConfig `json:"shared,omitempty" yaml:"shared,omitempty"`
}

type WorkersConfig

type WorkersConfig struct {
	Max            int `json:"max" yaml:"max,omitempty"`
	MaxIdleSeconds int `json:"maxIdleSeconds" yaml:"maxIdleSeconds,omitempty"`
}

Jump to

Keyboard shortcuts

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