Documentation ¶
Index ¶
- func RegisterDistSyncServer(s *grpc.Server, srv DistSyncServer)
- type DistSyncClient
- type DistSyncServer
- type InquireReply
- func (*InquireReply) Descriptor() ([]byte, []int)
- func (m *InquireReply) GetRelinquish() bool
- func (m *InquireReply) GetYield() bool
- func (*InquireReply) ProtoMessage()
- func (m *InquireReply) Reset()
- func (m *InquireReply) String() string
- func (m *InquireReply) XXX_DiscardUnknown()
- func (m *InquireReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *InquireReply) XXX_Merge(src proto.Message)
- func (m *InquireReply) XXX_Size() int
- func (m *InquireReply) XXX_Unmarshal(b []byte) error
- type LockReq
- func (*LockReq) Descriptor() ([]byte, []int)
- func (m *LockReq) GetNode() string
- func (m *LockReq) GetTstmp() *timestamp.Timestamp
- func (*LockReq) ProtoMessage()
- func (m *LockReq) Reset()
- func (m *LockReq) String() string
- func (m *LockReq) XXX_DiscardUnknown()
- func (m *LockReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LockReq) XXX_Merge(src proto.Message)
- func (m *LockReq) XXX_Size() int
- func (m *LockReq) XXX_Unmarshal(b []byte) error
- type Node
- func (*Node) Descriptor() ([]byte, []int)
- func (m *Node) GetNode() string
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (m *Node) String() string
- func (m *Node) XXX_DiscardUnknown()
- func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Node) XXX_Merge(src proto.Message)
- func (m *Node) XXX_Size() int
- func (m *Node) XXX_Unmarshal(b []byte) error
- type ValidateReply
- func (*ValidateReply) Descriptor() ([]byte, []int)
- func (m *ValidateReply) GetHolding() bool
- func (*ValidateReply) ProtoMessage()
- func (m *ValidateReply) Reset()
- func (m *ValidateReply) String() string
- func (m *ValidateReply) XXX_DiscardUnknown()
- func (m *ValidateReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidateReply) XXX_Merge(src proto.Message)
- func (m *ValidateReply) XXX_Size() int
- func (m *ValidateReply) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterDistSyncServer ¶
func RegisterDistSyncServer(s *grpc.Server, srv DistSyncServer)
Types ¶
type DistSyncClient ¶
type DistSyncClient interface { // Request for Distributed Lock Request(ctx context.Context, in *LockReq, opts ...grpc.CallOption) (*Node, error) // Request for Distributed Lock Reply(ctx context.Context, in *Node, opts ...grpc.CallOption) (*Node, error) // Relinquish Distributed Lock Relinquish(ctx context.Context, in *Node, opts ...grpc.CallOption) (*Node, error) // Inquire on status of Distributed Lock from head of queue Inquire(ctx context.Context, in *Node, opts ...grpc.CallOption) (*InquireReply, error) // Validate health of node holding Distributed Lock Validate(ctx context.Context, in *Node, opts ...grpc.CallOption) (*ValidateReply, error) }
DistSyncClient is the client API for DistSync service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewDistSyncClient ¶
func NewDistSyncClient(cc *grpc.ClientConn) DistSyncClient
type DistSyncServer ¶
type DistSyncServer interface { // Request for Distributed Lock Request(context.Context, *LockReq) (*Node, error) // Request for Distributed Lock Reply(context.Context, *Node) (*Node, error) // Relinquish Distributed Lock Relinquish(context.Context, *Node) (*Node, error) // Inquire on status of Distributed Lock from head of queue Inquire(context.Context, *Node) (*InquireReply, error) // Validate health of node holding Distributed Lock Validate(context.Context, *Node) (*ValidateReply, error) }
DistSyncServer is the server API for DistSync service.
type InquireReply ¶
type InquireReply struct { Yield bool `protobuf:"varint,1,opt,name=yield,proto3" json:"yield,omitempty"` Relinquish bool `protobuf:"varint,2,opt,name=relinquish,proto3" json:"relinquish,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Response to an Inquire message. May either yield or relinquish
func (*InquireReply) Descriptor ¶
func (*InquireReply) Descriptor() ([]byte, []int)
func (*InquireReply) GetRelinquish ¶
func (m *InquireReply) GetRelinquish() bool
func (*InquireReply) GetYield ¶
func (m *InquireReply) GetYield() bool
func (*InquireReply) ProtoMessage ¶
func (*InquireReply) ProtoMessage()
func (*InquireReply) Reset ¶
func (m *InquireReply) Reset()
func (*InquireReply) String ¶
func (m *InquireReply) String() string
func (*InquireReply) XXX_DiscardUnknown ¶
func (m *InquireReply) XXX_DiscardUnknown()
func (*InquireReply) XXX_Marshal ¶
func (m *InquireReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*InquireReply) XXX_Merge ¶
func (m *InquireReply) XXX_Merge(src proto.Message)
func (*InquireReply) XXX_Size ¶
func (m *InquireReply) XXX_Size() int
func (*InquireReply) XXX_Unmarshal ¶
func (m *InquireReply) XXX_Unmarshal(b []byte) error
type LockReq ¶
type LockReq struct { Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` Tstmp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=tstmp,proto3" json:"tstmp,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request the distributed lock
func (*LockReq) Descriptor ¶
func (*LockReq) ProtoMessage ¶
func (*LockReq) ProtoMessage()
func (*LockReq) XXX_DiscardUnknown ¶
func (m *LockReq) XXX_DiscardUnknown()
func (*LockReq) XXX_Marshal ¶
func (*LockReq) XXX_Unmarshal ¶
type Node ¶
type Node struct { Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
for Reply, Inquire, and Relinquish messages
func (*Node) Descriptor ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) XXX_DiscardUnknown ¶
func (m *Node) XXX_DiscardUnknown()
func (*Node) XXX_Unmarshal ¶
type ValidateReply ¶
type ValidateReply struct { Holding bool `protobuf:"varint,1,opt,name=holding,proto3" json:"holding,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Response to a Validate message. Return True if lock is still being held
func (*ValidateReply) Descriptor ¶
func (*ValidateReply) Descriptor() ([]byte, []int)
func (*ValidateReply) GetHolding ¶
func (m *ValidateReply) GetHolding() bool
func (*ValidateReply) ProtoMessage ¶
func (*ValidateReply) ProtoMessage()
func (*ValidateReply) Reset ¶
func (m *ValidateReply) Reset()
func (*ValidateReply) String ¶
func (m *ValidateReply) String() string
func (*ValidateReply) XXX_DiscardUnknown ¶
func (m *ValidateReply) XXX_DiscardUnknown()
func (*ValidateReply) XXX_Marshal ¶
func (m *ValidateReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidateReply) XXX_Merge ¶
func (m *ValidateReply) XXX_Merge(src proto.Message)
func (*ValidateReply) XXX_Size ¶
func (m *ValidateReply) XXX_Size() int
func (*ValidateReply) XXX_Unmarshal ¶
func (m *ValidateReply) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.