Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SinkYtState = "sink_yt_state"
)
Functions ¶
This section is empty.
Types ¶
type MainTxClient ¶
type MainTxClient struct {
// contains filtered or unexported fields
}
func NewMainTxClient ¶
func NewMainTxClient(transferID string, cp coordinator.Coordinator, client yt.Client, logger log.Logger) *MainTxClient
func (*MainTxClient) BeginSubTx ¶
func (c *MainTxClient) BeginSubTx() (yt.Tx, error)
BeginSubTx creates a child transaction from the main transaction.
func (*MainTxClient) BeginTx ¶
func (c *MainTxClient) BeginTx() error
BeginTx starts a new main transaction and saves it to the transfer state. Also, previous saved transaction will be aborted and removed from state.
func (*MainTxClient) Close ¶
func (c *MainTxClient) Close()
func (*MainTxClient) Commit ¶
func (c *MainTxClient) Commit() error
Commit commits the main transaction or abort it if an error occurs. Anyway, the client will be closed.
func (*MainTxClient) ExecOrAbort ¶
func (c *MainTxClient) ExecOrAbort(fn func(mainTxID yt.TxID) error) error
ExecOrAbort performs a function using the main transaction. In case of an error, aborts the main transaction and closes the client.
Click to show internal directories.
Click to hide internal directories.