Documentation ¶
Index ¶
- Variables
- func BuildDirectTarget(uri string) string
- func BuildDiscoveryTarget(uri string) string
- func RegisterBuilder(discovery registry.Discovery)
- type Branch
- func (branch *Branch) Convert() *proto.RegisterReq_Branch
- func (branch *Branch) SetData(data []byte) *Branch
- func (branch *Branch) SetHeader(header []byte) *Branch
- func (branch *Branch) SetLevel(level consts.Level) *Branch
- func (branch *Branch) SetProtocol(protocol Protocol) *Branch
- func (branch *Branch) SetTimeout(timeout int64) *Branch
- type Client
- func (client *Client) Begin(ctx context.Context) (gid string, err error)
- func (client *Client) Close(ctx context.Context) error
- func (client *Client) Commit(ctx context.Context, gid string) error
- func (client *Client) Register(ctx context.Context, gid string, groups []*Group) error
- func (client *Client) Rollback(ctx context.Context, gid string) error
- func (client *Client) Start(ctx context.Context, gid string) (err error)
- type Group
- type GroupOpt
- type HandlerFn
- type Manger
- type Option
- type Options
- type Protocol
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = &Options{ connTimeout: 15 * time.Second, dailOpts: []grpc.DialOption{}, }
DefaultOptions default for a Client Options
Functions ¶
func RegisterBuilder ¶
Types ¶
type Branch ¶
type Branch struct {
// contains filtered or unexported fields
}
func (*Branch) Convert ¶
func (branch *Branch) Convert() *proto.RegisterReq_Branch
func (*Branch) SetProtocol ¶
SetProtocol set branch network protocol
func (*Branch) SetTimeout ¶
SetTimeout set timeout for request branch
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func NewSagaGroup ¶
func NewTccGroup ¶
func (*Group) GetTranType ¶
func (g *Group) GetTranType() consts.TransactionType
func (*Group) SetTimeout ¶
type Manger ¶
type Manger struct {
// contains filtered or unexported fields
}
func (*Manger) AddNextWaitGroups ¶
type Option ¶
type Option func(options *Options)
func WithAfterFunc ¶
func WithBeforeFunc ¶
func WithConnTimeout ¶
func WithDiscovery ¶
func WithDiscovery() Option
func WithGrpcDailOpts ¶
func WithGrpcDailOpts(opts []grpc.DialOption) Option
Click to show internal directories.
Click to hide internal directories.