Documentation ¶
Index ¶
- Variables
- func RegisterTcServer(s grpc.ServiceRegistrar, srv TcServer)
- type TcClient
- type TcServer
- type Tcc
- func (*Tcc) Descriptor() ([]byte, []int)deprecated
- func (x *Tcc) GetBranches() []*TccBranch
- func (x *Tcc) GetGtid() string
- func (x *Tcc) GetMsg() string
- func (x *Tcc) GetState() string
- func (*Tcc) ProtoMessage()
- func (x *Tcc) ProtoReflect() protoreflect.Message
- func (x *Tcc) Reset()
- func (x *Tcc) String() string
- type TccBranch
- func (*TccBranch) Descriptor() ([]byte, []int)deprecated
- func (x *TccBranch) GetBranchId() int32
- func (x *TccBranch) GetPayload() []byte
- func (x *TccBranch) GetState() string
- func (*TccBranch) ProtoMessage()
- func (x *TccBranch) ProtoReflect() protoreflect.Message
- func (x *TccBranch) Reset()
- func (x *TccBranch) String() string
- type TccBranchRequest
- func (*TccBranchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TccBranchRequest) GetActionCancel() string
- func (x *TccBranchRequest) GetActionConfirm() string
- func (x *TccBranchRequest) GetBranchId() int32
- func (x *TccBranchRequest) GetPayload() []byte
- func (x *TccBranchRequest) GetRetry() *duration.Duration
- func (x *TccBranchRequest) GetTimeout() *duration.Duration
- func (*TccBranchRequest) ProtoMessage()
- func (x *TccBranchRequest) ProtoReflect() protoreflect.Message
- func (x *TccBranchRequest) Reset()
- func (x *TccBranchRequest) String() string
- type TccRequest
- func (*TccRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TccRequest) GetBranches() []*TccBranchRequest
- func (x *TccRequest) GetBusiness() string
- func (x *TccRequest) GetExpireTime() *timestamp.Timestamp
- func (x *TccRequest) GetGtid() string
- func (*TccRequest) ProtoMessage()
- func (x *TccRequest) ProtoReflect() protoreflect.Message
- func (x *TccRequest) Reset()
- func (x *TccRequest) String() string
- type TccResponse
- type UnimplementedTcServer
- func (UnimplementedTcServer) Cancel(context.Context, *TccRequest) (*TccResponse, error)
- func (UnimplementedTcServer) Confirm(context.Context, *TccRequest) (*TccResponse, error)
- func (UnimplementedTcServer) Get(context.Context, *TccRequest) (*TccResponse, error)
- func (UnimplementedTcServer) NewGtid(context.Context, *empty.Empty) (*TccResponse, error)
- func (UnimplementedTcServer) Prepare(context.Context, *TccRequest) (*TccResponse, error)
- func (UnimplementedTcServer) Register(context.Context, *TccRequest) (*TccResponse, error)
- type UnsafeTcServer
Constants ¶
This section is empty.
Variables ¶
var File_tcc_tc_proto protoreflect.FileDescriptor
var Tc_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tcc.Tc", HandlerType: (*TcServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "NewGtid", Handler: _Tc_NewGtid_Handler, }, { MethodName: "Get", Handler: _Tc_Get_Handler, }, { MethodName: "Prepare", Handler: _Tc_Prepare_Handler, }, { MethodName: "Register", Handler: _Tc_Register_Handler, }, { MethodName: "Confirm", Handler: _Tc_Confirm_Handler, }, { MethodName: "Cancel", Handler: _Tc_Cancel_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "tcc_tc.proto", }
Tc_ServiceDesc is the grpc.ServiceDesc for Tc service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTcServer ¶
func RegisterTcServer(s grpc.ServiceRegistrar, srv TcServer)
Types ¶
type TcClient ¶
type TcClient interface { NewGtid(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*TccResponse, error) Get(ctx context.Context, in *TccRequest, opts ...grpc.CallOption) (*TccResponse, error) Prepare(ctx context.Context, in *TccRequest, opts ...grpc.CallOption) (*TccResponse, error) Register(ctx context.Context, in *TccRequest, opts ...grpc.CallOption) (*TccResponse, error) Confirm(ctx context.Context, in *TccRequest, opts ...grpc.CallOption) (*TccResponse, error) Cancel(ctx context.Context, in *TccRequest, opts ...grpc.CallOption) (*TccResponse, error) }
TcClient is the client API for Tc service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewTcClient ¶
func NewTcClient(cc grpc.ClientConnInterface) TcClient
type TcServer ¶
type TcServer interface { NewGtid(context.Context, *empty.Empty) (*TccResponse, error) Get(context.Context, *TccRequest) (*TccResponse, error) Prepare(context.Context, *TccRequest) (*TccResponse, error) Register(context.Context, *TccRequest) (*TccResponse, error) Confirm(context.Context, *TccRequest) (*TccResponse, error) Cancel(context.Context, *TccRequest) (*TccResponse, error) // contains filtered or unexported methods }
TcServer is the server API for Tc service. All implementations must embed UnimplementedTcServer for forward compatibility
type Tcc ¶
type Tcc struct { Gtid string `protobuf:"bytes,1,opt,name=gtid,proto3" json:"gtid,omitempty"` State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` Branches []*TccBranch `protobuf:"bytes,3,rep,name=branches,proto3" json:"branches,omitempty"` Msg string `protobuf:"bytes,4,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*Tcc) Descriptor
deprecated
func (*Tcc) GetBranches ¶
func (*Tcc) ProtoMessage ¶
func (*Tcc) ProtoMessage()
func (*Tcc) ProtoReflect ¶
func (x *Tcc) ProtoReflect() protoreflect.Message
type TccBranch ¶
type TccBranch struct { BranchId int32 `protobuf:"varint,1,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"` State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // contains filtered or unexported fields }
func (*TccBranch) Descriptor
deprecated
func (*TccBranch) GetBranchId ¶
func (*TccBranch) GetPayload ¶
func (*TccBranch) ProtoMessage ¶
func (*TccBranch) ProtoMessage()
func (*TccBranch) ProtoReflect ¶
func (x *TccBranch) ProtoReflect() protoreflect.Message
type TccBranchRequest ¶
type TccBranchRequest struct { BranchId int32 `protobuf:"varint,1,opt,name=branch_id,json=branchId,proto3" json:"branch_id,omitempty"` ActionConfirm string `protobuf:"bytes,2,opt,name=action_confirm,json=actionConfirm,proto3" json:"action_confirm,omitempty"` ActionCancel string `protobuf:"bytes,3,opt,name=action_cancel,json=actionCancel,proto3" json:"action_cancel,omitempty"` Payload []byte `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"` Timeout *duration.Duration `protobuf:"bytes,5,opt,name=timeout,proto3" json:"timeout,omitempty"` Retry *duration.Duration `protobuf:"bytes,6,opt,name=retry,proto3" json:"retry,omitempty"` // contains filtered or unexported fields }
func (*TccBranchRequest) Descriptor
deprecated
func (*TccBranchRequest) Descriptor() ([]byte, []int)
Deprecated: Use TccBranchRequest.ProtoReflect.Descriptor instead.
func (*TccBranchRequest) GetActionCancel ¶
func (x *TccBranchRequest) GetActionCancel() string
func (*TccBranchRequest) GetActionConfirm ¶
func (x *TccBranchRequest) GetActionConfirm() string
func (*TccBranchRequest) GetBranchId ¶
func (x *TccBranchRequest) GetBranchId() int32
func (*TccBranchRequest) GetPayload ¶
func (x *TccBranchRequest) GetPayload() []byte
func (*TccBranchRequest) GetRetry ¶
func (x *TccBranchRequest) GetRetry() *duration.Duration
func (*TccBranchRequest) GetTimeout ¶
func (x *TccBranchRequest) GetTimeout() *duration.Duration
func (*TccBranchRequest) ProtoMessage ¶
func (*TccBranchRequest) ProtoMessage()
func (*TccBranchRequest) ProtoReflect ¶
func (x *TccBranchRequest) ProtoReflect() protoreflect.Message
func (*TccBranchRequest) Reset ¶
func (x *TccBranchRequest) Reset()
func (*TccBranchRequest) String ¶
func (x *TccBranchRequest) String() string
type TccRequest ¶
type TccRequest struct { Gtid string `protobuf:"bytes,1,opt,name=gtid,proto3" json:"gtid,omitempty"` Business string `protobuf:"bytes,2,opt,name=business,proto3" json:"business,omitempty"` ExpireTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"` Branches []*TccBranchRequest `protobuf:"bytes,4,rep,name=branches,proto3" json:"branches,omitempty"` // contains filtered or unexported fields }
func (*TccRequest) Descriptor
deprecated
func (*TccRequest) Descriptor() ([]byte, []int)
Deprecated: Use TccRequest.ProtoReflect.Descriptor instead.
func (*TccRequest) GetBranches ¶
func (x *TccRequest) GetBranches() []*TccBranchRequest
func (*TccRequest) GetBusiness ¶
func (x *TccRequest) GetBusiness() string
func (*TccRequest) GetExpireTime ¶
func (x *TccRequest) GetExpireTime() *timestamp.Timestamp
func (*TccRequest) GetGtid ¶
func (x *TccRequest) GetGtid() string
func (*TccRequest) ProtoMessage ¶
func (*TccRequest) ProtoMessage()
func (*TccRequest) ProtoReflect ¶
func (x *TccRequest) ProtoReflect() protoreflect.Message
func (*TccRequest) Reset ¶
func (x *TccRequest) Reset()
func (*TccRequest) String ¶
func (x *TccRequest) String() string
type TccResponse ¶
type TccResponse struct { Tcc *Tcc `protobuf:"bytes,1,opt,name=tcc,proto3" json:"tcc,omitempty"` // contains filtered or unexported fields }
func (*TccResponse) Descriptor
deprecated
func (*TccResponse) Descriptor() ([]byte, []int)
Deprecated: Use TccResponse.ProtoReflect.Descriptor instead.
func (*TccResponse) GetTcc ¶
func (x *TccResponse) GetTcc() *Tcc
func (*TccResponse) ProtoMessage ¶
func (*TccResponse) ProtoMessage()
func (*TccResponse) ProtoReflect ¶
func (x *TccResponse) ProtoReflect() protoreflect.Message
func (*TccResponse) Reset ¶
func (x *TccResponse) Reset()
func (*TccResponse) String ¶
func (x *TccResponse) String() string
type UnimplementedTcServer ¶
type UnimplementedTcServer struct { }
UnimplementedTcServer must be embedded to have forward compatible implementations.
func (UnimplementedTcServer) Cancel ¶
func (UnimplementedTcServer) Cancel(context.Context, *TccRequest) (*TccResponse, error)
func (UnimplementedTcServer) Confirm ¶
func (UnimplementedTcServer) Confirm(context.Context, *TccRequest) (*TccResponse, error)
func (UnimplementedTcServer) Get ¶
func (UnimplementedTcServer) Get(context.Context, *TccRequest) (*TccResponse, error)
func (UnimplementedTcServer) NewGtid ¶
func (UnimplementedTcServer) NewGtid(context.Context, *empty.Empty) (*TccResponse, error)
func (UnimplementedTcServer) Prepare ¶
func (UnimplementedTcServer) Prepare(context.Context, *TccRequest) (*TccResponse, error)
func (UnimplementedTcServer) Register ¶
func (UnimplementedTcServer) Register(context.Context, *TccRequest) (*TccResponse, error)
type UnsafeTcServer ¶
type UnsafeTcServer interface {
// contains filtered or unexported methods
}
UnsafeTcServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TcServer will result in compilation errors.