options

package
v0.0.0-...-d5b0b98 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectorConfig

type ConnectorConfig struct {
	ConnectorType define.ConnectorType
	PulsarConfig  PulsarConfig
	NsqConfig     NsqConfig
	KafkaConfig   KafkaConfig
}

ConnectorConfig is the configuration for a Connector

type DBConfig

type DBConfig struct {
	UserName                     string
	Password                     string
	Addr                         string
	Database                     string
	Charset                      string        `default:"utf8mb4"`
	DefaultStringSize            int           `default:"256"`
	MaxIdleConns                 int           `default:"1"`
	MaxOpenConns                 int           `default:"30"`
	ConnMaxLifetime              time.Duration `default:"1h"`
	EnablePrepareStmt            bool          `default:"true"`
	EnableSkipDefaultTransaction bool          `default:"true"`
}

DBConfig is the configuration for database

type GRPCServerConfig

type GRPCServerConfig struct {
	Addr string `default:":9000"`
}

GRPCServerConfig is the configuration for gRPC server

type HTTPServerConfig

type HTTPServerConfig struct {
	Addr string `default:":8080"`
}

HTTPServerConfig is the configuration for HTTP server

type KafkaConfig

type KafkaConfig struct {
	BrokerList []string
}

KafkaConfig is the configuration for kafka clusters

type NsqConfig

type NsqConfig struct {
	NodeList []string
}

NsqConfig is the configuration for nsq clusters

type Options

type Options struct {
	LogConfig               log.Config
	GRPCServerConfig        GRPCServerConfig
	HTTPServerConfig        HTTPServerConfig
	BizNO                   bizno.Config
	RealTimeConnectorConfig ConnectorConfig
	DelayConnectorConfig    ConnectorConfig
	TxConfig                TransactionConfig
	ConfConnectorConfig     cc.ConfConnectorConfig
	MonitorConfig           monitor.Options
}

Options is a producer server config

func NewOptions

func NewOptions() (*Options, error)

NewOptions creates a new producer configuration

type PulsarConfig

type PulsarConfig struct {
	URL         string
	TopicPrefix string
	Token       string
}

PulsarConfig is the configuration for pulsar clusters

type TransactionConfig

type TransactionConfig struct {
	ReadDBConfig    *DBConfig
	WriteDBConfig   *DBConfig
	RoutinePoolSize int
	Nonblocking     bool
}

TransactionConfig is the configuration for transaction

Jump to

Keyboard shortcuts

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