mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-28 20:13:33 +00:00
feat(distlock): refactor into a standalone package
This commit is contained in:
@@ -0,0 +1,547 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.2
|
||||
// protoc v5.27.3
|
||||
// source: pkg/distlock/grpc/lease.proto
|
||||
|
||||
package grpc
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
durationpb "google.golang.org/protobuf/types/known/durationpb"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type AcquireLeaseRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
|
||||
// Token uniquely identifies the lease owner.
|
||||
Token []byte `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
|
||||
// TTL sets how long the lease remains valid without renewal.
|
||||
Ttl *durationpb.Duration `protobuf:"bytes,3,opt,name=ttl,proto3" json:"ttl,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AcquireLeaseRequest) Reset() {
|
||||
*x = AcquireLeaseRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AcquireLeaseRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AcquireLeaseRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AcquireLeaseRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AcquireLeaseRequest.ProtoReflect.Descriptor instead.
|
||||
func (*AcquireLeaseRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_distlock_grpc_lease_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *AcquireLeaseRequest) GetResource() string {
|
||||
if x != nil {
|
||||
return x.Resource
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AcquireLeaseRequest) GetToken() []byte {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *AcquireLeaseRequest) GetTtl() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.Ttl
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type AcquireLeaseResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Acquired is true when this request successfully created the lease.
|
||||
Acquired bool `protobuf:"varint,1,opt,name=acquired,proto3" json:"acquired,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AcquireLeaseResponse) Reset() {
|
||||
*x = AcquireLeaseResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AcquireLeaseResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AcquireLeaseResponse) ProtoMessage() {}
|
||||
|
||||
func (x *AcquireLeaseResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AcquireLeaseResponse.ProtoReflect.Descriptor instead.
|
||||
func (*AcquireLeaseResponse) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_distlock_grpc_lease_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *AcquireLeaseResponse) GetAcquired() bool {
|
||||
if x != nil {
|
||||
return x.Acquired
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type RenewLeaseRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
|
||||
// Token identifies the owner of the existing lease.
|
||||
Token []byte `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
|
||||
// TTL sets how long the renewed lease remains valid.
|
||||
Ttl *durationpb.Duration `protobuf:"bytes,3,opt,name=ttl,proto3" json:"ttl,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RenewLeaseRequest) Reset() {
|
||||
*x = RenewLeaseRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RenewLeaseRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RenewLeaseRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RenewLeaseRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RenewLeaseRequest.ProtoReflect.Descriptor instead.
|
||||
func (*RenewLeaseRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_distlock_grpc_lease_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *RenewLeaseRequest) GetResource() string {
|
||||
if x != nil {
|
||||
return x.Resource
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RenewLeaseRequest) GetToken() []byte {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *RenewLeaseRequest) GetTtl() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.Ttl
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type RenewLeaseResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Renewed is true when an unexpired lease matched the ownership token and was successfully renewed.
|
||||
Renewed bool `protobuf:"varint,1,opt,name=renewed,proto3" json:"renewed,omitempty"`
|
||||
}
|
||||
|
||||
func (x *RenewLeaseResponse) Reset() {
|
||||
*x = RenewLeaseResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RenewLeaseResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RenewLeaseResponse) ProtoMessage() {}
|
||||
|
||||
func (x *RenewLeaseResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use RenewLeaseResponse.ProtoReflect.Descriptor instead.
|
||||
func (*RenewLeaseResponse) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_distlock_grpc_lease_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *RenewLeaseResponse) GetRenewed() bool {
|
||||
if x != nil {
|
||||
return x.Renewed
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type ReleaseLeaseRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Resource string `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
|
||||
// Token identifies the owner of the existing lease.
|
||||
Token []byte `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ReleaseLeaseRequest) Reset() {
|
||||
*x = ReleaseLeaseRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ReleaseLeaseRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ReleaseLeaseRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ReleaseLeaseRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ReleaseLeaseRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ReleaseLeaseRequest) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_distlock_grpc_lease_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ReleaseLeaseRequest) GetResource() string {
|
||||
if x != nil {
|
||||
return x.Resource
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ReleaseLeaseRequest) GetToken() []byte {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ReleaseLeaseResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Released is true when an unexpired lease existed, matched the ownership token, and was successfully released.
|
||||
Released bool `protobuf:"varint,1,opt,name=released,proto3" json:"released,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ReleaseLeaseResponse) Reset() {
|
||||
*x = ReleaseLeaseResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ReleaseLeaseResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ReleaseLeaseResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ReleaseLeaseResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_pkg_distlock_grpc_lease_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ReleaseLeaseResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ReleaseLeaseResponse) Descriptor() ([]byte, []int) {
|
||||
return file_pkg_distlock_grpc_lease_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ReleaseLeaseResponse) GetReleased() bool {
|
||||
if x != nil {
|
||||
return x.Released
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_pkg_distlock_grpc_lease_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_pkg_distlock_grpc_lease_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x70, 0x6b, 0x67, 0x2f, 0x64, 0x69, 0x73, 0x74, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x67,
|
||||
0x72, 0x70, 0x63, 0x2f, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x0b, 0x64, 0x69, 0x73, 0x74, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x13,
|
||||
0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05,
|
||||
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74,
|
||||
0x74, 0x6c, 0x22, 0x32, 0x0a, 0x14, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x4c, 0x65, 0x61,
|
||||
0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63,
|
||||
0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x63,
|
||||
0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x72, 0x0a, 0x11, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x4c,
|
||||
0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72,
|
||||
0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2b, 0x0a,
|
||||
0x03, 0x74, 0x74, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x22, 0x2e, 0x0a, 0x12, 0x52, 0x65,
|
||||
0x6e, 0x65, 0x77, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x07, 0x72, 0x65, 0x6e, 0x65, 0x77, 0x65, 0x64, 0x22, 0x47, 0x0a, 0x13, 0x52, 0x65,
|
||||
0x6c, 0x65, 0x61, 0x73, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x74, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x22, 0x32, 0x0a, 0x14, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4c, 0x65,
|
||||
0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72,
|
||||
0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72,
|
||||
0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x64, 0x32, 0xf1, 0x01, 0x0a, 0x05, 0x4c, 0x65, 0x61, 0x73,
|
||||
0x65, 0x12, 0x4e, 0x0a, 0x07, 0x41, 0x63, 0x71, 0x75, 0x69, 0x72, 0x65, 0x12, 0x20, 0x2e, 0x64,
|
||||
0x69, 0x73, 0x74, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x71, 0x75, 0x69,
|
||||
0x72, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21,
|
||||
0x2e, 0x64, 0x69, 0x73, 0x74, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x71,
|
||||
0x75, 0x69, 0x72, 0x65, 0x4c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x12, 0x48, 0x0a, 0x05, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x73,
|
||||
0x74, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x4c, 0x65,
|
||||
0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x73,
|
||||
0x74, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6e, 0x65, 0x77, 0x4c, 0x65,
|
||||
0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x07, 0x52,
|
||||
0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x20, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x6c, 0x6f, 0x63,
|
||||
0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4c, 0x65, 0x61, 0x73,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x69, 0x73, 0x74, 0x6c,
|
||||
0x6f, 0x63, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x4c, 0x65,
|
||||
0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67,
|
||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x73, 0x76, 0x69, 0x64, 0x65,
|
||||
0x72, 0x73, 0x6b, 0x69, 0x2f, 0x75, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x70, 0x6b, 0x67,
|
||||
0x2f, 0x64, 0x69, 0x73, 0x74, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_pkg_distlock_grpc_lease_proto_rawDescOnce sync.Once
|
||||
file_pkg_distlock_grpc_lease_proto_rawDescData = file_pkg_distlock_grpc_lease_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_pkg_distlock_grpc_lease_proto_rawDescGZIP() []byte {
|
||||
file_pkg_distlock_grpc_lease_proto_rawDescOnce.Do(func() {
|
||||
file_pkg_distlock_grpc_lease_proto_rawDescData = protoimpl.X.CompressGZIP(file_pkg_distlock_grpc_lease_proto_rawDescData)
|
||||
})
|
||||
return file_pkg_distlock_grpc_lease_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_pkg_distlock_grpc_lease_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_pkg_distlock_grpc_lease_proto_goTypes = []any{
|
||||
(*AcquireLeaseRequest)(nil), // 0: distlock.v1.AcquireLeaseRequest
|
||||
(*AcquireLeaseResponse)(nil), // 1: distlock.v1.AcquireLeaseResponse
|
||||
(*RenewLeaseRequest)(nil), // 2: distlock.v1.RenewLeaseRequest
|
||||
(*RenewLeaseResponse)(nil), // 3: distlock.v1.RenewLeaseResponse
|
||||
(*ReleaseLeaseRequest)(nil), // 4: distlock.v1.ReleaseLeaseRequest
|
||||
(*ReleaseLeaseResponse)(nil), // 5: distlock.v1.ReleaseLeaseResponse
|
||||
(*durationpb.Duration)(nil), // 6: google.protobuf.Duration
|
||||
}
|
||||
var file_pkg_distlock_grpc_lease_proto_depIdxs = []int32{
|
||||
6, // 0: distlock.v1.AcquireLeaseRequest.ttl:type_name -> google.protobuf.Duration
|
||||
6, // 1: distlock.v1.RenewLeaseRequest.ttl:type_name -> google.protobuf.Duration
|
||||
0, // 2: distlock.v1.Lease.Acquire:input_type -> distlock.v1.AcquireLeaseRequest
|
||||
2, // 3: distlock.v1.Lease.Renew:input_type -> distlock.v1.RenewLeaseRequest
|
||||
4, // 4: distlock.v1.Lease.Release:input_type -> distlock.v1.ReleaseLeaseRequest
|
||||
1, // 5: distlock.v1.Lease.Acquire:output_type -> distlock.v1.AcquireLeaseResponse
|
||||
3, // 6: distlock.v1.Lease.Renew:output_type -> distlock.v1.RenewLeaseResponse
|
||||
5, // 7: distlock.v1.Lease.Release:output_type -> distlock.v1.ReleaseLeaseResponse
|
||||
5, // [5:8] is the sub-list for method output_type
|
||||
2, // [2:5] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_pkg_distlock_grpc_lease_proto_init() }
|
||||
func file_pkg_distlock_grpc_lease_proto_init() {
|
||||
if File_pkg_distlock_grpc_lease_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_pkg_distlock_grpc_lease_proto_msgTypes[0].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AcquireLeaseRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_distlock_grpc_lease_proto_msgTypes[1].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*AcquireLeaseResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_distlock_grpc_lease_proto_msgTypes[2].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RenewLeaseRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_distlock_grpc_lease_proto_msgTypes[3].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*RenewLeaseResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_distlock_grpc_lease_proto_msgTypes[4].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ReleaseLeaseRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_pkg_distlock_grpc_lease_proto_msgTypes[5].Exporter = func(v any, i int) any {
|
||||
switch v := v.(*ReleaseLeaseResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_pkg_distlock_grpc_lease_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_pkg_distlock_grpc_lease_proto_goTypes,
|
||||
DependencyIndexes: file_pkg_distlock_grpc_lease_proto_depIdxs,
|
||||
MessageInfos: file_pkg_distlock_grpc_lease_proto_msgTypes,
|
||||
}.Build()
|
||||
File_pkg_distlock_grpc_lease_proto = out.File
|
||||
file_pkg_distlock_grpc_lease_proto_rawDesc = nil
|
||||
file_pkg_distlock_grpc_lease_proto_goTypes = nil
|
||||
file_pkg_distlock_grpc_lease_proto_depIdxs = nil
|
||||
}
|
||||
Reference in New Issue
Block a user