Documentation ¶
Index ¶
- Variables
- type Batch
- type Cfg
- type Client
- func (c *Client) BranchCommitACK(xid meta.FragmentXID, bid uint64, status meta.BranchStatus)
- func (c *Client) BranchRollbackACK(xid meta.FragmentXID, bid uint64, status meta.BranchStatus)
- func (c *Client) CommitBatch(batch Batch) ([]meta.Message, error)
- func (c *Client) CommitGlobal(xid meta.FragmentXID, extraData string) error
- func (c *Client) CreateBatch() Batch
- func (c *Client) CreateGlobal(name string, timeout time.Duration) (meta.FragmentXID, error)
- func (c *Client) RegisterBranch(xid meta.FragmentXID, resource string, branchType meta.BranchType, ...) (uint64, error)
- func (c *Client) ReportBranchStatus(xid meta.FragmentXID, bid uint64, status meta.BranchStatus, ...) error
- func (c *Client) RollbackGlobal(xid meta.FragmentXID, extraData string) error
- type ResourceHandler
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch interface { CreateGlobal(name string, timeout time.Duration) RegisterBranch(xid meta.FragmentXID, resource string, branchType meta.BranchType, locks string, applicationData string) ReportBranchStatus(xid meta.FragmentXID, bid uint64, status meta.BranchStatus, branchType meta.BranchType, resource string, applicationData string) CommitGlobal(xid meta.FragmentXID, extraData string) RollbackGlobal(xid meta.FragmentXID, extraData string) }
Batch batch operation
type Cfg ¶
type Cfg struct { Seq uint64 Addrs []string HeartbeatDuration time.Duration Timeout time.Duration Handler ResourceHandler ApplicationID, Version, ApplicationData string Resources []string }
Cfg client cfg
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client seata client
func (*Client) BranchCommitACK ¶
func (c *Client) BranchCommitACK(xid meta.FragmentXID, bid uint64, status meta.BranchStatus)
BranchCommitACK ack branch commit
func (*Client) BranchRollbackACK ¶
func (c *Client) BranchRollbackACK(xid meta.FragmentXID, bid uint64, status meta.BranchStatus)
BranchRollbackACK ack branch rollback
func (*Client) CommitBatch ¶
CommitBatch commit batch
func (*Client) CommitGlobal ¶
func (c *Client) CommitGlobal(xid meta.FragmentXID, extraData string) error
CommitGlobal commit global transaction
func (*Client) CreateBatch ¶
CreateBatch create batch operation
func (*Client) CreateGlobal ¶
CreateGlobal register a global transaction
func (*Client) RegisterBranch ¶
func (c *Client) RegisterBranch(xid meta.FragmentXID, resource string, branchType meta.BranchType, locks string, applicationData string) (uint64, error)
RegisterBranch register a branch transaction
func (*Client) ReportBranchStatus ¶
func (c *Client) ReportBranchStatus(xid meta.FragmentXID, bid uint64, status meta.BranchStatus, branchType meta.BranchType, resource string, applicationData string) error
ReportBranchStatus report branch status at phase one
type ResourceHandler ¶
type ResourceHandler interface { OnBranchCommit(xid meta.FragmentXID, bid uint64) OnBranchRollback(xid meta.FragmentXID, bid uint64) }
ResourceHandler resource handler
Click to show internal directories.
Click to hide internal directories.