config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WorkerConfig

type WorkerConfig struct {
	Logger *zap.Logger

	ServiceDiscovery *WorkerDiscoveryConfig `yaml:"service_discovery" json:"service_discovery,omitempty"`
}

func DefaultWorkerConfig

func DefaultWorkerConfig() WorkerConfig

DefaultWorkerConfig 默认config

func (*WorkerConfig) GetWorkerDiscoveries

func (c *WorkerConfig) GetWorkerDiscoveries() *WorkerDiscoveryConfig

nolint

func (*WorkerConfig) SetServiceDiscovery

func (c *WorkerConfig) SetServiceDiscovery(s WorkerDiscoveryConfig)

type WorkerDiscoveryConfig

type WorkerDiscoveryConfig struct {
	Protocol string `json:"protocol"`
	Address  string `json:"address"`
	TimeOut  int64  `json:"timeout"`
	UserName string `json:"username"`
	Password string `json:"password"`
	Db       int    `json:"db"`
}

WorkerDiscoveryConfig will be used to create

Jump to

Keyboard shortcuts

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