pb

package
v0.0.0-...-daf8b82 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_tcc_tc_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Tcc.ProtoReflect.Descriptor instead.

func (*Tcc) GetBranches

func (x *Tcc) GetBranches() []*TccBranch

func (*Tcc) GetGtid

func (x *Tcc) GetGtid() string

func (*Tcc) GetMsg

func (x *Tcc) GetMsg() string

func (*Tcc) GetState

func (x *Tcc) GetState() string

func (*Tcc) ProtoMessage

func (*Tcc) ProtoMessage()

func (*Tcc) ProtoReflect

func (x *Tcc) ProtoReflect() protoreflect.Message

func (*Tcc) Reset

func (x *Tcc) Reset()

func (*Tcc) String

func (x *Tcc) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use TccBranch.ProtoReflect.Descriptor instead.

func (*TccBranch) GetBranchId

func (x *TccBranch) GetBranchId() int32

func (*TccBranch) GetPayload

func (x *TccBranch) GetPayload() []byte

func (*TccBranch) GetState

func (x *TccBranch) GetState() string

func (*TccBranch) ProtoMessage

func (*TccBranch) ProtoMessage()

func (*TccBranch) ProtoReflect

func (x *TccBranch) ProtoReflect() protoreflect.Message

func (*TccBranch) Reset

func (x *TccBranch) Reset()

func (*TccBranch) String

func (x *TccBranch) String() string

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) Confirm

func (UnimplementedTcServer) Get

func (UnimplementedTcServer) NewGtid

func (UnimplementedTcServer) Prepare

func (UnimplementedTcServer) Register

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.

Jump to

Keyboard shortcuts

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