service

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LockService_Lock_FullMethodName        = "/LockService/Lock"
	LockService_UnLock_FullMethodName      = "/LockService/UnLock"
	LockService_ForceLock_FullMethodName   = "/LockService/ForceLock"
	LockService_ForceUnLock_FullMethodName = "/LockService/ForceUnLock"
)

Variables

View Source
var LockService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "LockService",
	HandlerType: (*LockServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Lock",
			Handler:    _LockService_Lock_Handler,
		},
		{
			MethodName: "UnLock",
			Handler:    _LockService_UnLock_Handler,
		},
		{
			MethodName: "ForceLock",
			Handler:    _LockService_ForceLock_Handler,
		},
		{
			MethodName: "ForceUnLock",
			Handler:    _LockService_ForceUnLock_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "lock.proto",
}

LockService_ServiceDesc is the grpc.ServiceDesc for LockService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterLockServiceServer

func RegisterLockServiceServer(s grpc.ServiceRegistrar, srv LockServiceServer)

Types

type ForceLockReply added in v0.0.6

type ForceLockReply struct {
	Result bool   `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	Msg    string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*ForceLockReply) Descriptor deprecated added in v0.0.6

func (*ForceLockReply) Descriptor() ([]byte, []int)

Deprecated: Use ForceLockReply.ProtoReflect.Descriptor instead.

func (*ForceLockReply) GetMsg added in v0.0.6

func (x *ForceLockReply) GetMsg() string

func (*ForceLockReply) GetResult added in v0.0.6

func (x *ForceLockReply) GetResult() bool

func (*ForceLockReply) ProtoMessage added in v0.0.6

func (*ForceLockReply) ProtoMessage()

func (*ForceLockReply) ProtoReflect added in v0.0.6

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

func (*ForceLockReply) Reset added in v0.0.6

func (x *ForceLockReply) Reset()

func (*ForceLockReply) String added in v0.0.6

func (x *ForceLockReply) String() string

type ForceLockRequest added in v0.0.6

type ForceLockRequest struct {
	ClientId string `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
	LockName string `protobuf:"bytes,2,opt,name=lockName,proto3" json:"lockName,omitempty"`
	// contains filtered or unexported fields
}

func (*ForceLockRequest) Descriptor deprecated added in v0.0.6

func (*ForceLockRequest) Descriptor() ([]byte, []int)

Deprecated: Use ForceLockRequest.ProtoReflect.Descriptor instead.

func (*ForceLockRequest) GetClientId added in v0.0.6

func (x *ForceLockRequest) GetClientId() string

func (*ForceLockRequest) GetLockName added in v0.0.6

func (x *ForceLockRequest) GetLockName() string

func (*ForceLockRequest) ProtoMessage added in v0.0.6

func (*ForceLockRequest) ProtoMessage()

func (*ForceLockRequest) ProtoReflect added in v0.0.6

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

func (*ForceLockRequest) Reset added in v0.0.6

func (x *ForceLockRequest) Reset()

func (*ForceLockRequest) String added in v0.0.6

func (x *ForceLockRequest) String() string

type ForceUnLockReply

type ForceUnLockReply struct {
	Result bool   `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	Msg    string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*ForceUnLockReply) Descriptor deprecated

func (*ForceUnLockReply) Descriptor() ([]byte, []int)

Deprecated: Use ForceUnLockReply.ProtoReflect.Descriptor instead.

func (*ForceUnLockReply) GetMsg

func (x *ForceUnLockReply) GetMsg() string

func (*ForceUnLockReply) GetResult

func (x *ForceUnLockReply) GetResult() bool

func (*ForceUnLockReply) ProtoMessage

func (*ForceUnLockReply) ProtoMessage()

func (*ForceUnLockReply) ProtoReflect

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

func (*ForceUnLockReply) Reset

func (x *ForceUnLockReply) Reset()

func (*ForceUnLockReply) String

func (x *ForceUnLockReply) String() string

type ForceUnLockRequest

type ForceUnLockRequest struct {
	LockName string `protobuf:"bytes,2,opt,name=lockName,proto3" json:"lockName,omitempty"`
	// contains filtered or unexported fields
}

func (*ForceUnLockRequest) Descriptor deprecated

func (*ForceUnLockRequest) Descriptor() ([]byte, []int)

Deprecated: Use ForceUnLockRequest.ProtoReflect.Descriptor instead.

func (*ForceUnLockRequest) GetLockName

func (x *ForceUnLockRequest) GetLockName() string

func (*ForceUnLockRequest) ProtoMessage

func (*ForceUnLockRequest) ProtoMessage()

func (*ForceUnLockRequest) ProtoReflect

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

func (*ForceUnLockRequest) Reset

func (x *ForceUnLockRequest) Reset()

func (*ForceUnLockRequest) String

func (x *ForceUnLockRequest) String() string

type LockReply

type LockReply struct {
	Result bool   `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	Msg    string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*LockReply) Descriptor deprecated

func (*LockReply) Descriptor() ([]byte, []int)

Deprecated: Use LockReply.ProtoReflect.Descriptor instead.

func (*LockReply) GetMsg

func (x *LockReply) GetMsg() string

func (*LockReply) GetResult

func (x *LockReply) GetResult() bool

func (*LockReply) ProtoMessage

func (*LockReply) ProtoMessage()

func (*LockReply) ProtoReflect

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

func (*LockReply) Reset

func (x *LockReply) Reset()

func (*LockReply) String

func (x *LockReply) String() string

type LockRequest

type LockRequest struct {
	ClientId string `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
	LockName string `protobuf:"bytes,2,opt,name=lockName,proto3" json:"lockName,omitempty"`
	// contains filtered or unexported fields
}

func (*LockRequest) Descriptor deprecated

func (*LockRequest) Descriptor() ([]byte, []int)

Deprecated: Use LockRequest.ProtoReflect.Descriptor instead.

func (*LockRequest) GetClientId

func (x *LockRequest) GetClientId() string

func (*LockRequest) GetLockName

func (x *LockRequest) GetLockName() string

func (*LockRequest) ProtoMessage

func (*LockRequest) ProtoMessage()

func (*LockRequest) ProtoReflect

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

func (*LockRequest) Reset

func (x *LockRequest) Reset()

func (*LockRequest) String

func (x *LockRequest) String() string

type LockServiceClient

type LockServiceClient interface {
	Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockReply, error)
	UnLock(ctx context.Context, in *UnLockRequest, opts ...grpc.CallOption) (*UnLockReply, error)
	ForceLock(ctx context.Context, in *ForceLockRequest, opts ...grpc.CallOption) (*ForceLockReply, error)
	ForceUnLock(ctx context.Context, in *ForceUnLockRequest, opts ...grpc.CallOption) (*ForceUnLockReply, error)
}

LockServiceClient is the client API for LockService 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.

type LockServiceServer

type LockServiceServer interface {
	Lock(context.Context, *LockRequest) (*LockReply, error)
	UnLock(context.Context, *UnLockRequest) (*UnLockReply, error)
	ForceLock(context.Context, *ForceLockRequest) (*ForceLockReply, error)
	ForceUnLock(context.Context, *ForceUnLockRequest) (*ForceUnLockReply, error)
	// contains filtered or unexported methods
}

LockServiceServer is the server API for LockService service. All implementations must embed UnimplementedLockServiceServer for forward compatibility.

type UnLockReply

type UnLockReply struct {
	Result bool   `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	Msg    string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*UnLockReply) Descriptor deprecated

func (*UnLockReply) Descriptor() ([]byte, []int)

Deprecated: Use UnLockReply.ProtoReflect.Descriptor instead.

func (*UnLockReply) GetMsg

func (x *UnLockReply) GetMsg() string

func (*UnLockReply) GetResult

func (x *UnLockReply) GetResult() bool

func (*UnLockReply) ProtoMessage

func (*UnLockReply) ProtoMessage()

func (*UnLockReply) ProtoReflect

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

func (*UnLockReply) Reset

func (x *UnLockReply) Reset()

func (*UnLockReply) String

func (x *UnLockReply) String() string

type UnLockRequest

type UnLockRequest struct {
	ClientId string `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
	LockName string `protobuf:"bytes,2,opt,name=lockName,proto3" json:"lockName,omitempty"`
	// contains filtered or unexported fields
}

func (*UnLockRequest) Descriptor deprecated

func (*UnLockRequest) Descriptor() ([]byte, []int)

Deprecated: Use UnLockRequest.ProtoReflect.Descriptor instead.

func (*UnLockRequest) GetClientId

func (x *UnLockRequest) GetClientId() string

func (*UnLockRequest) GetLockName

func (x *UnLockRequest) GetLockName() string

func (*UnLockRequest) ProtoMessage

func (*UnLockRequest) ProtoMessage()

func (*UnLockRequest) ProtoReflect

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

func (*UnLockRequest) Reset

func (x *UnLockRequest) Reset()

func (*UnLockRequest) String

func (x *UnLockRequest) String() string

type UnimplementedLockServiceServer

type UnimplementedLockServiceServer struct{}

UnimplementedLockServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedLockServiceServer) ForceLock added in v0.0.6

func (UnimplementedLockServiceServer) ForceUnLock

func (UnimplementedLockServiceServer) Lock

func (UnimplementedLockServiceServer) UnLock

type UnsafeLockServiceServer

type UnsafeLockServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeLockServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to LockServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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