seata

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 27 Imported by: 3

Documentation

Index

Constants

View Source
const (
	CommitRequestPath   = "tcc_commit_request_path"
	RollbackRequestPath = "tcc_rollback_request_path"
)
View Source
const (
	SEATA        = "seata"
	XID          = "x_seata_xid"
	BranchID     = "x_seata_branch_id"
	ResponseFlag = 0x600
)

Variables

This section is empty.

Functions

func CreateFilterFactory

func CreateFilterFactory(conf map[string]interface{}) (api.StreamFilterChainFactory, error)

func NewFilter

func NewFilter(conf *Seata) (*filter, error)

Types

type RequestContext

type RequestContext struct {
	ActionContext map[string]string
	Headers       protocol.CommonHeader
	Body          buffer.IoBuffer
	Trailers      protocol.CommonHeader
}

func (*RequestContext) Decode

func (ctx *RequestContext) Decode(b []byte)

func (*RequestContext) Encode

func (ctx *RequestContext) Encode() ([]byte, error)

type Seata

type Seata struct {
	Addressing         string `yaml:"addressing" json:"addressing"`
	ServerAddressing   string `yaml:"serverAddressing" json:"serverAddressing"`
	CommitRetryCount   int32  `default:"5" yaml:"commitRetryCount" json:"commitRetryCount,omitempty"`
	RollbackRetryCount int32  `default:"5" yaml:"rollbackRetryCount" json:"rollbackRetryCount,omitempty"`

	ClientParameters struct {
		Time                time.Duration `yaml:"time" json:"time"`
		Timeout             time.Duration `yaml:"timeout" json:"timeout"`
		PermitWithoutStream bool          `yaml:"permitWithoutStream" json:"permitWithoutStream"`
	} `yaml:"clientParameters" json:"clientParameters"`

	TransactionInfos []*TransactionInfo `yaml:"transactionInfos" json:"transactionInfos"`
	TCCResources     []*TCCResource     `yaml:"tccResources" json:"tccResources"`
}

Seata seata config

func (*Seata) GetClientParameters

func (config *Seata) GetClientParameters() keepalive.ClientParameters

GetClientParameters used to config grpc connection keep alive

type TCCResource

type TCCResource struct {
	PrepareRequestPath  string `yaml:"prepareRequestPath" json:"prepareRequestPath"`
	CommitRequestPath   string `yaml:"commitRequestPath" json:"commitRequestPath"`
	RollbackRequestPath string `yaml:"rollbackRequestPath" json:"rollbackRequestPath"`
}

TCCResource tcc resource config

type TransactionInfo

type TransactionInfo struct {
	RequestPath string `yaml:"requestPath" json:"requestPath"`
	Timeout     int32  `yaml:"timeout" json:"timeout"`
}

TransactionInfo transaction info config

Jump to

Keyboard shortcuts

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