options

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 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 ElasticsearchOptions

type ElasticsearchOptions struct {
	Addrs    []string `json:"addrs" mapstructure:"addrs"`
	Username string   `json:"username" mapstructure:"username"`
	Password string   `json:"password" mapstructure:"password"`
}

func NewElasticsearchOptions

func NewElasticsearchOptions() *ElasticsearchOptions

func (*ElasticsearchOptions) AddFlags

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

func (*ElasticsearchOptions) Validate

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

type EtcdOptions

type EtcdOptions struct {
	Endpoints      []string `json:"endpoints" mapstructure:"endpoints"`
	Timeout        int      `json:"timeout" mapstructure:"timeout"`
	RequestTimeout int      `json:"request-time" mapstructure:"request-time"`
	LeaseExpire    int      `json:"lease-expire" mapstructure:"lease-expire"`
	Username       string   `json:"username" mapstructure:"username"`
	Password       string   `json:"password" mapstructure:"password"`
	UseTLS         bool     `json:"use-tls" mapstructure:"use-tls"`
	Namespece      string   `json:"namespace" mapstructure:"namespace"`
	Path           string   `json:"path" mapstructure:"path"`
}

EtcdOptions defines options for etcd cluster.

func NewEtcdOptions

func NewEtcdOptions() *EtcdOptions

NewEtcdOptions creates a `zero` value instance.

func (*EtcdOptions) AddFlags

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

AddFlags adds flags related to etcd storage to the specified FlagSet.

func (*EtcdOptions) Validate

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

type NsqOptions

type NsqOptions struct {
	LookupdHttpAddresses []string `json:"lookupd-http-addresses" mapstructure:"lookupd-http-addresses"`
	Topics               []string `json:"topics" mapstructure:"topics"`
	Channel              string   `json:"channel" mapstructure:"channel"`
	DialTimeout          int      `json:"dial-timeout" mapstructure:"dial-timeout"`
	ReadTimeout          int      `json:"read-timeout" mapstructure:"read-timeout"`
	WriteTimeout         int      `json:"write-timeout" mapstructure:"write-timeout"`
	MaxInFlight          int      `json:"max-in-flight" mapstructure:"max-in-flight"`
}

func NewNsqOptionsOptions

func NewNsqOptionsOptions() *NsqOptions

func (*NsqOptions) AddFlags

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

func (*NsqOptions) Validate

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

Jump to

Keyboard shortcuts

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