client

package
v1.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init seata client client

func InitPath

func InitPath(configFilePath string)

InitPath init client with config path

Types

type ClientConfig

type ClientConfig struct {
	TmConfig   tm.TmConfig  `yaml:"tm" json:"tm,omitempty" koanf:"tm"`
	RmConfig   rm.Config    `yaml:"rm" json:"rm,omitempty" koanf:"rm"`
	UndoConfig undo.Config  `yaml:"undo" json:"undo,omitempty" koanf:"undo"`
	XaConfig   sql.XAConfig `yaml:"xa" json:"xa" koanf:"xa"`
}

func (*ClientConfig) RegisterFlagsWithPrefix

func (c *ClientConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

type Config

type Config struct {
	Enabled                   bool   `yaml:"enabled" json:"enabled,omitempty" koanf:"enabled"`
	ApplicationID             string `yaml:"application-id" json:"application-id,omitempty" koanf:"application-id"`
	TxServiceGroup            string `yaml:"tx-service-group" json:"tx-service-group,omitempty" koanf:"tx-service-group"`
	AccessKey                 string `yaml:"access-key" json:"access-key,omitempty" koanf:"access-key"`
	SecretKey                 string `yaml:"secret-key" json:"secret-key,omitempty" koanf:"secret-key"`
	EnableAutoDataSourceProxy bool   `yaml:"enable-auto-data-source-proxy" json:"enable-auto-data-source-proxy,omitempty" koanf:"enable-auto-data-source-proxy"`
	DataSourceProxyMode       string `yaml:"data-source-proxy-mode" json:"data-source-proxy-mode,omitempty" koanf:"data-source-proxy-mode"`

	AsyncWorkerConfig sql.AsyncWorkerConfig        `yaml:"async" json:"async" koanf:"async"`
	TCCConfig         tcc.Config                   `yaml:"tcc" json:"tcc" koanf:"tcc"`
	ClientConfig      ClientConfig                 `yaml:"client" json:"client" koanf:"client"`
	GettyConfig       remoteConfig.Config          `yaml:"getty" json:"getty" koanf:"getty"`
	TransportConfig   remoteConfig.TransportConfig `yaml:"transport" json:"transport" koanf:"transport"`
	ServiceConfig     discovery.ServiceConfig      `yaml:"service" json:"service" koanf:"service"`
	RegistryConfig    discovery.RegistryConfig     `yaml:"registry" json:"registry" koanf:"registry"`
}

func LoadJson

func LoadJson(bytes []byte) *Config

Load parse config from json bytes

func LoadPath

func LoadPath(configFilePath string) *Config

Load parse config from user config path

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(f *flag.FlagSet)

Jump to

Keyboard shortcuts

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