Documentation ¶
Index ¶
- Constants
- Variables
- func GetType(resource *Resource) string
- func RegisterLocketServer(s *grpc.Server, srv LocketServer)
- type FetchAllRequest
- func (*FetchAllRequest) Descriptor() ([]byte, []int)
- func (this *FetchAllRequest) Equal(that interface{}) bool
- func (m *FetchAllRequest) GetType() stringdeprecated
- func (m *FetchAllRequest) GetTypeCode() TypeCode
- func (this *FetchAllRequest) GoString() string
- func (m *FetchAllRequest) Marshal() (dAtA []byte, err error)
- func (m *FetchAllRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *FetchAllRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FetchAllRequest) ProtoMessage()
- func (m *FetchAllRequest) Reset()
- func (m *FetchAllRequest) Size() (n int)
- func (this *FetchAllRequest) String() string
- func (m *FetchAllRequest) Unmarshal(dAtA []byte) error
- func (m *FetchAllRequest) XXX_DiscardUnknown()
- func (m *FetchAllRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FetchAllRequest) XXX_Merge(src proto.Message)
- func (m *FetchAllRequest) XXX_Size() int
- func (m *FetchAllRequest) XXX_Unmarshal(b []byte) error
- type FetchAllResponse
- func (*FetchAllResponse) Descriptor() ([]byte, []int)
- func (this *FetchAllResponse) Equal(that interface{}) bool
- func (m *FetchAllResponse) GetResources() []*Resource
- func (this *FetchAllResponse) GoString() string
- func (m *FetchAllResponse) Marshal() (dAtA []byte, err error)
- func (m *FetchAllResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *FetchAllResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FetchAllResponse) ProtoMessage()
- func (m *FetchAllResponse) Reset()
- func (m *FetchAllResponse) Size() (n int)
- func (this *FetchAllResponse) String() string
- func (m *FetchAllResponse) Unmarshal(dAtA []byte) error
- func (m *FetchAllResponse) XXX_DiscardUnknown()
- func (m *FetchAllResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FetchAllResponse) XXX_Merge(src proto.Message)
- func (m *FetchAllResponse) XXX_Size() int
- func (m *FetchAllResponse) XXX_Unmarshal(b []byte) error
- type FetchRequest
- func (*FetchRequest) Descriptor() ([]byte, []int)
- func (this *FetchRequest) Equal(that interface{}) bool
- func (m *FetchRequest) GetKey() string
- func (this *FetchRequest) GoString() string
- func (m *FetchRequest) Marshal() (dAtA []byte, err error)
- func (m *FetchRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *FetchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FetchRequest) ProtoMessage()
- func (m *FetchRequest) Reset()
- func (m *FetchRequest) Size() (n int)
- func (this *FetchRequest) String() string
- func (m *FetchRequest) Unmarshal(dAtA []byte) error
- func (m *FetchRequest) XXX_DiscardUnknown()
- func (m *FetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FetchRequest) XXX_Merge(src proto.Message)
- func (m *FetchRequest) XXX_Size() int
- func (m *FetchRequest) XXX_Unmarshal(b []byte) error
- type FetchResponse
- func (*FetchResponse) Descriptor() ([]byte, []int)
- func (this *FetchResponse) Equal(that interface{}) bool
- func (m *FetchResponse) GetResource() *Resource
- func (this *FetchResponse) GoString() string
- func (m *FetchResponse) Marshal() (dAtA []byte, err error)
- func (m *FetchResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *FetchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*FetchResponse) ProtoMessage()
- func (m *FetchResponse) Reset()
- func (m *FetchResponse) Size() (n int)
- func (this *FetchResponse) String() string
- func (m *FetchResponse) Unmarshal(dAtA []byte) error
- func (m *FetchResponse) XXX_DiscardUnknown()
- func (m *FetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *FetchResponse) XXX_Merge(src proto.Message)
- func (m *FetchResponse) XXX_Size() int
- func (m *FetchResponse) XXX_Unmarshal(b []byte) error
- type LockRequest
- func (*LockRequest) Descriptor() ([]byte, []int)
- func (this *LockRequest) Equal(that interface{}) bool
- func (m *LockRequest) GetResource() *Resource
- func (m *LockRequest) GetTtlInSeconds() int64
- func (this *LockRequest) GoString() string
- func (m *LockRequest) Marshal() (dAtA []byte, err error)
- func (m *LockRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *LockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LockRequest) ProtoMessage()
- func (m *LockRequest) Reset()
- func (m *LockRequest) Size() (n int)
- func (this *LockRequest) String() string
- func (m *LockRequest) Unmarshal(dAtA []byte) error
- func (m *LockRequest) XXX_DiscardUnknown()
- func (m *LockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LockRequest) XXX_Merge(src proto.Message)
- func (m *LockRequest) XXX_Size() int
- func (m *LockRequest) XXX_Unmarshal(b []byte) error
- type LockResponse
- func (*LockResponse) Descriptor() ([]byte, []int)
- func (this *LockResponse) Equal(that interface{}) bool
- func (this *LockResponse) GoString() string
- func (m *LockResponse) Marshal() (dAtA []byte, err error)
- func (m *LockResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *LockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LockResponse) ProtoMessage()
- func (m *LockResponse) Reset()
- func (m *LockResponse) Size() (n int)
- func (this *LockResponse) String() string
- func (m *LockResponse) Unmarshal(dAtA []byte) error
- func (m *LockResponse) XXX_DiscardUnknown()
- func (m *LockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LockResponse) XXX_Merge(src proto.Message)
- func (m *LockResponse) XXX_Size() int
- func (m *LockResponse) XXX_Unmarshal(b []byte) error
- type LocketClient
- type LocketServer
- type ReleaseRequest
- func (*ReleaseRequest) Descriptor() ([]byte, []int)
- func (this *ReleaseRequest) Equal(that interface{}) bool
- func (m *ReleaseRequest) GetResource() *Resource
- func (this *ReleaseRequest) GoString() string
- func (m *ReleaseRequest) Marshal() (dAtA []byte, err error)
- func (m *ReleaseRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ReleaseRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ReleaseRequest) ProtoMessage()
- func (m *ReleaseRequest) Reset()
- func (m *ReleaseRequest) Size() (n int)
- func (this *ReleaseRequest) String() string
- func (m *ReleaseRequest) Unmarshal(dAtA []byte) error
- func (m *ReleaseRequest) XXX_DiscardUnknown()
- func (m *ReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReleaseRequest) XXX_Merge(src proto.Message)
- func (m *ReleaseRequest) XXX_Size() int
- func (m *ReleaseRequest) XXX_Unmarshal(b []byte) error
- type ReleaseResponse
- func (*ReleaseResponse) Descriptor() ([]byte, []int)
- func (this *ReleaseResponse) Equal(that interface{}) bool
- func (this *ReleaseResponse) GoString() string
- func (m *ReleaseResponse) Marshal() (dAtA []byte, err error)
- func (m *ReleaseResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ReleaseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ReleaseResponse) ProtoMessage()
- func (m *ReleaseResponse) Reset()
- func (m *ReleaseResponse) Size() (n int)
- func (this *ReleaseResponse) String() string
- func (m *ReleaseResponse) Unmarshal(dAtA []byte) error
- func (m *ReleaseResponse) XXX_DiscardUnknown()
- func (m *ReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ReleaseResponse) XXX_Merge(src proto.Message)
- func (m *ReleaseResponse) XXX_Size() int
- func (m *ReleaseResponse) XXX_Unmarshal(b []byte) error
- type Resource
- func (*Resource) Descriptor() ([]byte, []int)
- func (this *Resource) Equal(that interface{}) bool
- func (m *Resource) GetKey() string
- func (m *Resource) GetOwner() string
- func (m *Resource) GetType() stringdeprecated
- func (m *Resource) GetTypeCode() TypeCode
- func (m *Resource) GetValue() string
- func (this *Resource) GoString() string
- func (m *Resource) Marshal() (dAtA []byte, err error)
- func (m *Resource) MarshalTo(dAtA []byte) (int, error)
- func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Resource) ProtoMessage()
- func (m *Resource) Reset()
- func (m *Resource) Size() (n int)
- func (this *Resource) String() string
- func (m *Resource) Unmarshal(dAtA []byte) error
- func (m *Resource) XXX_DiscardUnknown()
- func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Resource) XXX_Merge(src proto.Message)
- func (m *Resource) XXX_Size() int
- func (m *Resource) XXX_Unmarshal(b []byte) error
- type TypeCode
- type UnimplementedLocketServer
- func (*UnimplementedLocketServer) Fetch(ctx context.Context, req *FetchRequest) (*FetchResponse, error)
- func (*UnimplementedLocketServer) FetchAll(ctx context.Context, req *FetchAllRequest) (*FetchAllResponse, error)
- func (*UnimplementedLocketServer) Lock(ctx context.Context, req *LockRequest) (*LockResponse, error)
- func (*UnimplementedLocketServer) Release(ctx context.Context, req *ReleaseRequest) (*ReleaseResponse, error)
Constants ¶
View Source
const LockType = "lock"
View Source
const PresenceType = "presence"
Variables ¶
View Source
var ( ErrInvalidLengthLocket = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLocket = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLocket = fmt.Errorf("proto: unexpected end of group") )
View Source
var ErrInvalidOwner = status.Errorf(codes.InvalidArgument, "invalid-owner")
View Source
var ErrInvalidTTL = status.Errorf(codes.InvalidArgument, "invalid-ttl")
View Source
var ErrInvalidType = status.Errorf(codes.NotFound, "invalid-type")
View Source
var ErrLockCollision = status.Errorf(codes.AlreadyExists, "lock-collision")
View Source
var ErrResourceNotFound = status.Errorf(codes.NotFound, "resource-not-found")
View Source
var TypeCode_name = map[int32]string{
0: "UNKNOWN",
1: "LOCK",
2: "PRESENCE",
}
View Source
var TypeCode_value = map[string]int32{
"UNKNOWN": 0,
"LOCK": 1,
"PRESENCE": 2,
}
Functions ¶
func RegisterLocketServer ¶
func RegisterLocketServer(s *grpc.Server, srv LocketServer)
Types ¶
type FetchAllRequest ¶
type FetchAllRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Deprecated: Do not use. TypeCode TypeCode `protobuf:"varint,2,opt,name=type_code,json=typeCode,proto3,enum=models.TypeCode" json:"type_code,omitempty"` }
func (*FetchAllRequest) Descriptor ¶
func (*FetchAllRequest) Descriptor() ([]byte, []int)
func (*FetchAllRequest) Equal ¶
func (this *FetchAllRequest) Equal(that interface{}) bool
func (*FetchAllRequest) GetType
deprecated
func (m *FetchAllRequest) GetType() string
Deprecated: Do not use.
func (*FetchAllRequest) GetTypeCode ¶
func (m *FetchAllRequest) GetTypeCode() TypeCode
func (*FetchAllRequest) GoString ¶
func (this *FetchAllRequest) GoString() string
func (*FetchAllRequest) Marshal ¶
func (m *FetchAllRequest) Marshal() (dAtA []byte, err error)
func (*FetchAllRequest) MarshalToSizedBuffer ¶
func (m *FetchAllRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FetchAllRequest) ProtoMessage ¶
func (*FetchAllRequest) ProtoMessage()
func (*FetchAllRequest) Reset ¶
func (m *FetchAllRequest) Reset()
func (*FetchAllRequest) Size ¶
func (m *FetchAllRequest) Size() (n int)
func (*FetchAllRequest) String ¶
func (this *FetchAllRequest) String() string
func (*FetchAllRequest) Unmarshal ¶
func (m *FetchAllRequest) Unmarshal(dAtA []byte) error
func (*FetchAllRequest) XXX_DiscardUnknown ¶
func (m *FetchAllRequest) XXX_DiscardUnknown()
func (*FetchAllRequest) XXX_Marshal ¶
func (m *FetchAllRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FetchAllRequest) XXX_Merge ¶
func (m *FetchAllRequest) XXX_Merge(src proto.Message)
func (*FetchAllRequest) XXX_Size ¶
func (m *FetchAllRequest) XXX_Size() int
func (*FetchAllRequest) XXX_Unmarshal ¶
func (m *FetchAllRequest) XXX_Unmarshal(b []byte) error
type FetchAllResponse ¶
type FetchAllResponse struct {
Resources []*Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
}
func (*FetchAllResponse) Descriptor ¶
func (*FetchAllResponse) Descriptor() ([]byte, []int)
func (*FetchAllResponse) Equal ¶
func (this *FetchAllResponse) Equal(that interface{}) bool
func (*FetchAllResponse) GetResources ¶
func (m *FetchAllResponse) GetResources() []*Resource
func (*FetchAllResponse) GoString ¶
func (this *FetchAllResponse) GoString() string
func (*FetchAllResponse) Marshal ¶
func (m *FetchAllResponse) Marshal() (dAtA []byte, err error)
func (*FetchAllResponse) MarshalToSizedBuffer ¶
func (m *FetchAllResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FetchAllResponse) ProtoMessage ¶
func (*FetchAllResponse) ProtoMessage()
func (*FetchAllResponse) Reset ¶
func (m *FetchAllResponse) Reset()
func (*FetchAllResponse) Size ¶
func (m *FetchAllResponse) Size() (n int)
func (*FetchAllResponse) String ¶
func (this *FetchAllResponse) String() string
func (*FetchAllResponse) Unmarshal ¶
func (m *FetchAllResponse) Unmarshal(dAtA []byte) error
func (*FetchAllResponse) XXX_DiscardUnknown ¶
func (m *FetchAllResponse) XXX_DiscardUnknown()
func (*FetchAllResponse) XXX_Marshal ¶
func (m *FetchAllResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FetchAllResponse) XXX_Merge ¶
func (m *FetchAllResponse) XXX_Merge(src proto.Message)
func (*FetchAllResponse) XXX_Size ¶
func (m *FetchAllResponse) XXX_Size() int
func (*FetchAllResponse) XXX_Unmarshal ¶
func (m *FetchAllResponse) XXX_Unmarshal(b []byte) error
type FetchRequest ¶
type FetchRequest struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
}
func (*FetchRequest) Descriptor ¶
func (*FetchRequest) Descriptor() ([]byte, []int)
func (*FetchRequest) Equal ¶
func (this *FetchRequest) Equal(that interface{}) bool
func (*FetchRequest) GetKey ¶
func (m *FetchRequest) GetKey() string
func (*FetchRequest) GoString ¶
func (this *FetchRequest) GoString() string
func (*FetchRequest) Marshal ¶
func (m *FetchRequest) Marshal() (dAtA []byte, err error)
func (*FetchRequest) MarshalToSizedBuffer ¶
func (m *FetchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FetchRequest) ProtoMessage ¶
func (*FetchRequest) ProtoMessage()
func (*FetchRequest) Reset ¶
func (m *FetchRequest) Reset()
func (*FetchRequest) Size ¶
func (m *FetchRequest) Size() (n int)
func (*FetchRequest) String ¶
func (this *FetchRequest) String() string
func (*FetchRequest) Unmarshal ¶
func (m *FetchRequest) Unmarshal(dAtA []byte) error
func (*FetchRequest) XXX_DiscardUnknown ¶
func (m *FetchRequest) XXX_DiscardUnknown()
func (*FetchRequest) XXX_Marshal ¶
func (m *FetchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FetchRequest) XXX_Merge ¶
func (m *FetchRequest) XXX_Merge(src proto.Message)
func (*FetchRequest) XXX_Size ¶
func (m *FetchRequest) XXX_Size() int
func (*FetchRequest) XXX_Unmarshal ¶
func (m *FetchRequest) XXX_Unmarshal(b []byte) error
type FetchResponse ¶
type FetchResponse struct {
Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
}
func (*FetchResponse) Descriptor ¶
func (*FetchResponse) Descriptor() ([]byte, []int)
func (*FetchResponse) Equal ¶
func (this *FetchResponse) Equal(that interface{}) bool
func (*FetchResponse) GetResource ¶
func (m *FetchResponse) GetResource() *Resource
func (*FetchResponse) GoString ¶
func (this *FetchResponse) GoString() string
func (*FetchResponse) Marshal ¶
func (m *FetchResponse) Marshal() (dAtA []byte, err error)
func (*FetchResponse) MarshalToSizedBuffer ¶
func (m *FetchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*FetchResponse) ProtoMessage ¶
func (*FetchResponse) ProtoMessage()
func (*FetchResponse) Reset ¶
func (m *FetchResponse) Reset()
func (*FetchResponse) Size ¶
func (m *FetchResponse) Size() (n int)
func (*FetchResponse) String ¶
func (this *FetchResponse) String() string
func (*FetchResponse) Unmarshal ¶
func (m *FetchResponse) Unmarshal(dAtA []byte) error
func (*FetchResponse) XXX_DiscardUnknown ¶
func (m *FetchResponse) XXX_DiscardUnknown()
func (*FetchResponse) XXX_Marshal ¶
func (m *FetchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*FetchResponse) XXX_Merge ¶
func (m *FetchResponse) XXX_Merge(src proto.Message)
func (*FetchResponse) XXX_Size ¶
func (m *FetchResponse) XXX_Size() int
func (*FetchResponse) XXX_Unmarshal ¶
func (m *FetchResponse) XXX_Unmarshal(b []byte) error
type LockRequest ¶
type LockRequest struct { Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"` TtlInSeconds int64 `protobuf:"varint,2,opt,name=ttl_in_seconds,json=ttlInSeconds,proto3" json:"ttl_in_seconds,omitempty"` }
func (*LockRequest) Descriptor ¶
func (*LockRequest) Descriptor() ([]byte, []int)
func (*LockRequest) Equal ¶
func (this *LockRequest) Equal(that interface{}) bool
func (*LockRequest) GetResource ¶
func (m *LockRequest) GetResource() *Resource
func (*LockRequest) GetTtlInSeconds ¶
func (m *LockRequest) GetTtlInSeconds() int64
func (*LockRequest) GoString ¶
func (this *LockRequest) GoString() string
func (*LockRequest) Marshal ¶
func (m *LockRequest) Marshal() (dAtA []byte, err error)
func (*LockRequest) MarshalToSizedBuffer ¶
func (m *LockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LockRequest) ProtoMessage ¶
func (*LockRequest) ProtoMessage()
func (*LockRequest) Reset ¶
func (m *LockRequest) Reset()
func (*LockRequest) Size ¶
func (m *LockRequest) Size() (n int)
func (*LockRequest) String ¶
func (this *LockRequest) String() string
func (*LockRequest) Unmarshal ¶
func (m *LockRequest) Unmarshal(dAtA []byte) error
func (*LockRequest) XXX_DiscardUnknown ¶
func (m *LockRequest) XXX_DiscardUnknown()
func (*LockRequest) XXX_Marshal ¶
func (m *LockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LockRequest) XXX_Merge ¶
func (m *LockRequest) XXX_Merge(src proto.Message)
func (*LockRequest) XXX_Size ¶
func (m *LockRequest) XXX_Size() int
func (*LockRequest) XXX_Unmarshal ¶
func (m *LockRequest) XXX_Unmarshal(b []byte) error
type LockResponse ¶
type LockResponse struct { }
func (*LockResponse) Descriptor ¶
func (*LockResponse) Descriptor() ([]byte, []int)
func (*LockResponse) Equal ¶
func (this *LockResponse) Equal(that interface{}) bool
func (*LockResponse) GoString ¶
func (this *LockResponse) GoString() string
func (*LockResponse) Marshal ¶
func (m *LockResponse) Marshal() (dAtA []byte, err error)
func (*LockResponse) MarshalToSizedBuffer ¶
func (m *LockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LockResponse) ProtoMessage ¶
func (*LockResponse) ProtoMessage()
func (*LockResponse) Reset ¶
func (m *LockResponse) Reset()
func (*LockResponse) Size ¶
func (m *LockResponse) Size() (n int)
func (*LockResponse) String ¶
func (this *LockResponse) String() string
func (*LockResponse) Unmarshal ¶
func (m *LockResponse) Unmarshal(dAtA []byte) error
func (*LockResponse) XXX_DiscardUnknown ¶
func (m *LockResponse) XXX_DiscardUnknown()
func (*LockResponse) XXX_Marshal ¶
func (m *LockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LockResponse) XXX_Merge ¶
func (m *LockResponse) XXX_Merge(src proto.Message)
func (*LockResponse) XXX_Size ¶
func (m *LockResponse) XXX_Size() int
func (*LockResponse) XXX_Unmarshal ¶
func (m *LockResponse) XXX_Unmarshal(b []byte) error
type LocketClient ¶
type LocketClient interface { Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error) Fetch(ctx context.Context, in *FetchRequest, opts ...grpc.CallOption) (*FetchResponse, error) Release(ctx context.Context, in *ReleaseRequest, opts ...grpc.CallOption) (*ReleaseResponse, error) FetchAll(ctx context.Context, in *FetchAllRequest, opts ...grpc.CallOption) (*FetchAllResponse, error) }
LocketClient is the client API for Locket service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewLocketClient ¶
func NewLocketClient(cc *grpc.ClientConn) LocketClient
type LocketServer ¶
type LocketServer interface { Lock(context.Context, *LockRequest) (*LockResponse, error) Fetch(context.Context, *FetchRequest) (*FetchResponse, error) Release(context.Context, *ReleaseRequest) (*ReleaseResponse, error) FetchAll(context.Context, *FetchAllRequest) (*FetchAllResponse, error) }
LocketServer is the server API for Locket service.
type ReleaseRequest ¶
type ReleaseRequest struct {
Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
}
func (*ReleaseRequest) Descriptor ¶
func (*ReleaseRequest) Descriptor() ([]byte, []int)
func (*ReleaseRequest) Equal ¶
func (this *ReleaseRequest) Equal(that interface{}) bool
func (*ReleaseRequest) GetResource ¶
func (m *ReleaseRequest) GetResource() *Resource
func (*ReleaseRequest) GoString ¶
func (this *ReleaseRequest) GoString() string
func (*ReleaseRequest) Marshal ¶
func (m *ReleaseRequest) Marshal() (dAtA []byte, err error)
func (*ReleaseRequest) MarshalToSizedBuffer ¶
func (m *ReleaseRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ReleaseRequest) ProtoMessage ¶
func (*ReleaseRequest) ProtoMessage()
func (*ReleaseRequest) Reset ¶
func (m *ReleaseRequest) Reset()
func (*ReleaseRequest) Size ¶
func (m *ReleaseRequest) Size() (n int)
func (*ReleaseRequest) String ¶
func (this *ReleaseRequest) String() string
func (*ReleaseRequest) Unmarshal ¶
func (m *ReleaseRequest) Unmarshal(dAtA []byte) error
func (*ReleaseRequest) XXX_DiscardUnknown ¶
func (m *ReleaseRequest) XXX_DiscardUnknown()
func (*ReleaseRequest) XXX_Marshal ¶
func (m *ReleaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReleaseRequest) XXX_Merge ¶
func (m *ReleaseRequest) XXX_Merge(src proto.Message)
func (*ReleaseRequest) XXX_Size ¶
func (m *ReleaseRequest) XXX_Size() int
func (*ReleaseRequest) XXX_Unmarshal ¶
func (m *ReleaseRequest) XXX_Unmarshal(b []byte) error
type ReleaseResponse ¶
type ReleaseResponse struct { }
func (*ReleaseResponse) Descriptor ¶
func (*ReleaseResponse) Descriptor() ([]byte, []int)
func (*ReleaseResponse) Equal ¶
func (this *ReleaseResponse) Equal(that interface{}) bool
func (*ReleaseResponse) GoString ¶
func (this *ReleaseResponse) GoString() string
func (*ReleaseResponse) Marshal ¶
func (m *ReleaseResponse) Marshal() (dAtA []byte, err error)
func (*ReleaseResponse) MarshalToSizedBuffer ¶
func (m *ReleaseResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ReleaseResponse) ProtoMessage ¶
func (*ReleaseResponse) ProtoMessage()
func (*ReleaseResponse) Reset ¶
func (m *ReleaseResponse) Reset()
func (*ReleaseResponse) Size ¶
func (m *ReleaseResponse) Size() (n int)
func (*ReleaseResponse) String ¶
func (this *ReleaseResponse) String() string
func (*ReleaseResponse) Unmarshal ¶
func (m *ReleaseResponse) Unmarshal(dAtA []byte) error
func (*ReleaseResponse) XXX_DiscardUnknown ¶
func (m *ReleaseResponse) XXX_DiscardUnknown()
func (*ReleaseResponse) XXX_Marshal ¶
func (m *ReleaseResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ReleaseResponse) XXX_Merge ¶
func (m *ReleaseResponse) XXX_Merge(src proto.Message)
func (*ReleaseResponse) XXX_Size ¶
func (m *ReleaseResponse) XXX_Size() int
func (*ReleaseResponse) XXX_Unmarshal ¶
func (m *ReleaseResponse) XXX_Unmarshal(b []byte) error
type Resource ¶
type Resource struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // Deprecated: Do not use. TypeCode TypeCode `protobuf:"varint,5,opt,name=type_code,json=typeCode,proto3,enum=models.TypeCode" json:"type_code,omitempty"` }
func GetResource ¶
func (*Resource) Descriptor ¶
func (*Resource) GetTypeCode ¶
func (*Resource) MarshalToSizedBuffer ¶
func (*Resource) ProtoMessage ¶
func (*Resource) ProtoMessage()
func (*Resource) XXX_DiscardUnknown ¶
func (m *Resource) XXX_DiscardUnknown()
func (*Resource) XXX_Marshal ¶
func (*Resource) XXX_Unmarshal ¶
type UnimplementedLocketServer ¶
type UnimplementedLocketServer struct { }
UnimplementedLocketServer can be embedded to have forward compatible implementations.
func (*UnimplementedLocketServer) Fetch ¶
func (*UnimplementedLocketServer) Fetch(ctx context.Context, req *FetchRequest) (*FetchResponse, error)
func (*UnimplementedLocketServer) FetchAll ¶
func (*UnimplementedLocketServer) FetchAll(ctx context.Context, req *FetchAllRequest) (*FetchAllResponse, error)
func (*UnimplementedLocketServer) Lock ¶
func (*UnimplementedLocketServer) Lock(ctx context.Context, req *LockRequest) (*LockResponse, error)
func (*UnimplementedLocketServer) Release ¶
func (*UnimplementedLocketServer) Release(ctx context.Context, req *ReleaseRequest) (*ReleaseResponse, error)
Click to show internal directories.
Click to hide internal directories.