Documentation ¶
Index ¶
- func RegisterAddServiceServer(s *grpc.Server, srv AddServiceServer)
- func RegisterNodeServiceServer(s *grpc.Server, srv NodeServiceServer)
- type AddServiceClient
- type AddServiceServer
- type KVRequest
- func (*KVRequest) Descriptor() ([]byte, []int)
- func (m *KVRequest) GetKey() string
- func (m *KVRequest) GetValue() string
- func (*KVRequest) ProtoMessage()
- func (m *KVRequest) Reset()
- func (m *KVRequest) String() string
- func (m *KVRequest) XXX_DiscardUnknown()
- func (m *KVRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KVRequest) XXX_Merge(src proto.Message)
- func (m *KVRequest) XXX_Size() int
- func (m *KVRequest) XXX_Unmarshal(b []byte) error
- type KVResponse
- func (*KVResponse) Descriptor() ([]byte, []int)
- func (m *KVResponse) GetMsg() string
- func (m *KVResponse) GetPing() bool
- func (m *KVResponse) GetValue() string
- func (*KVResponse) ProtoMessage()
- func (m *KVResponse) Reset()
- func (m *KVResponse) String() string
- func (m *KVResponse) XXX_DiscardUnknown()
- func (m *KVResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KVResponse) XXX_Merge(src proto.Message)
- func (m *KVResponse) XXX_Size() int
- func (m *KVResponse) XXX_Unmarshal(b []byte) error
- type Node
- func (*Node) Descriptor() ([]byte, []int)
- func (m *Node) GetIpaddr() string
- func (m *Node) GetPort() 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 NodeRequest
- func (*NodeRequest) Descriptor() ([]byte, []int)
- func (m *NodeRequest) GetIpaddr() string
- func (m *NodeRequest) GetPort() string
- func (*NodeRequest) ProtoMessage()
- func (m *NodeRequest) Reset()
- func (m *NodeRequest) String() string
- func (m *NodeRequest) XXX_DiscardUnknown()
- func (m *NodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NodeRequest) XXX_Merge(src proto.Message)
- func (m *NodeRequest) XXX_Size() int
- func (m *NodeRequest) XXX_Unmarshal(b []byte) error
- type NodeResponse
- func (*NodeResponse) Descriptor() ([]byte, []int)
- func (m *NodeResponse) GetNotified() bool
- func (*NodeResponse) ProtoMessage()
- func (m *NodeResponse) Reset()
- func (m *NodeResponse) String() string
- func (m *NodeResponse) XXX_DiscardUnknown()
- func (m *NodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NodeResponse) XXX_Merge(src proto.Message)
- func (m *NodeResponse) XXX_Size() int
- func (m *NodeResponse) XXX_Unmarshal(b []byte) error
- type NodeServiceClient
- type NodeServiceServer
- type SuccessorResponse
- func (*SuccessorResponse) Descriptor() ([]byte, []int)
- func (m *SuccessorResponse) GetSuccessorlist() []*Node
- func (*SuccessorResponse) ProtoMessage()
- func (m *SuccessorResponse) Reset()
- func (m *SuccessorResponse) String() string
- func (m *SuccessorResponse) XXX_DiscardUnknown()
- func (m *SuccessorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SuccessorResponse) XXX_Merge(src proto.Message)
- func (m *SuccessorResponse) XXX_Size() int
- func (m *SuccessorResponse) XXX_Unmarshal(b []byte) error
- type UnimplementedAddServiceServer
- func (*UnimplementedAddServiceServer) Delete(ctx context.Context, req *KVRequest) (*KVResponse, error)
- func (*UnimplementedAddServiceServer) Get(ctx context.Context, req *KVRequest) (*KVResponse, error)
- func (*UnimplementedAddServiceServer) Ping(ctx context.Context, req *KVRequest) (*KVResponse, error)
- func (*UnimplementedAddServiceServer) Put(ctx context.Context, req *KVRequest) (*KVResponse, error)
- type UnimplementedNodeServiceServer
- func (*UnimplementedNodeServiceServer) FindSuccessor(ctx context.Context, req *NodeRequest) (*Node, error)
- func (*UnimplementedNodeServiceServer) GetPredecessor(ctx context.Context, req *NodeRequest) (*Node, error)
- func (*UnimplementedNodeServiceServer) GetSuccessorList(ctx context.Context, req *NodeRequest) (*SuccessorResponse, error)
- func (*UnimplementedNodeServiceServer) Notify(ctx context.Context, req *NodeRequest) (*Node, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAddServiceServer ¶
func RegisterAddServiceServer(s *grpc.Server, srv AddServiceServer)
func RegisterNodeServiceServer ¶
func RegisterNodeServiceServer(s *grpc.Server, srv NodeServiceServer)
Types ¶
type AddServiceClient ¶
type AddServiceClient interface { Ping(ctx context.Context, in *KVRequest, opts ...grpc.CallOption) (*KVResponse, error) Get(ctx context.Context, in *KVRequest, opts ...grpc.CallOption) (*KVResponse, error) Put(ctx context.Context, in *KVRequest, opts ...grpc.CallOption) (*KVResponse, error) Delete(ctx context.Context, in *KVRequest, opts ...grpc.CallOption) (*KVResponse, error) }
AddServiceClient is the client API for AddService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAddServiceClient ¶
func NewAddServiceClient(cc *grpc.ClientConn) AddServiceClient
type AddServiceServer ¶
type AddServiceServer interface { Ping(context.Context, *KVRequest) (*KVResponse, error) Get(context.Context, *KVRequest) (*KVResponse, error) Put(context.Context, *KVRequest) (*KVResponse, error) Delete(context.Context, *KVRequest) (*KVResponse, error) }
AddServiceServer is the server API for AddService service.
type KVRequest ¶
type KVRequest struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*KVRequest) Descriptor ¶
func (*KVRequest) ProtoMessage ¶
func (*KVRequest) ProtoMessage()
func (*KVRequest) XXX_DiscardUnknown ¶
func (m *KVRequest) XXX_DiscardUnknown()
func (*KVRequest) XXX_Marshal ¶
func (*KVRequest) XXX_Unmarshal ¶
type KVResponse ¶
type KVResponse struct { Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` Ping bool `protobuf:"varint,3,opt,name=ping,proto3" json:"ping,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*KVResponse) Descriptor ¶
func (*KVResponse) Descriptor() ([]byte, []int)
func (*KVResponse) GetMsg ¶
func (m *KVResponse) GetMsg() string
func (*KVResponse) GetPing ¶
func (m *KVResponse) GetPing() bool
func (*KVResponse) GetValue ¶
func (m *KVResponse) GetValue() string
func (*KVResponse) ProtoMessage ¶
func (*KVResponse) ProtoMessage()
func (*KVResponse) Reset ¶
func (m *KVResponse) Reset()
func (*KVResponse) String ¶
func (m *KVResponse) String() string
func (*KVResponse) XXX_DiscardUnknown ¶
func (m *KVResponse) XXX_DiscardUnknown()
func (*KVResponse) XXX_Marshal ¶
func (m *KVResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*KVResponse) XXX_Merge ¶
func (m *KVResponse) XXX_Merge(src proto.Message)
func (*KVResponse) XXX_Size ¶
func (m *KVResponse) XXX_Size() int
func (*KVResponse) XXX_Unmarshal ¶
func (m *KVResponse) XXX_Unmarshal(b []byte) error
type Node ¶
type Node struct { Ipaddr string `protobuf:"bytes,1,opt,name=ipaddr,proto3" json:"ipaddr,omitempty"` Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Node) Descriptor ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) XXX_DiscardUnknown ¶
func (m *Node) XXX_DiscardUnknown()
func (*Node) XXX_Unmarshal ¶
type NodeRequest ¶
type NodeRequest struct { Ipaddr string `protobuf:"bytes,1,opt,name=ipaddr,proto3" json:"ipaddr,omitempty"` Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*NodeRequest) Descriptor ¶
func (*NodeRequest) Descriptor() ([]byte, []int)
func (*NodeRequest) GetIpaddr ¶
func (m *NodeRequest) GetIpaddr() string
func (*NodeRequest) GetPort ¶
func (m *NodeRequest) GetPort() string
func (*NodeRequest) ProtoMessage ¶
func (*NodeRequest) ProtoMessage()
func (*NodeRequest) Reset ¶
func (m *NodeRequest) Reset()
func (*NodeRequest) String ¶
func (m *NodeRequest) String() string
func (*NodeRequest) XXX_DiscardUnknown ¶
func (m *NodeRequest) XXX_DiscardUnknown()
func (*NodeRequest) XXX_Marshal ¶
func (m *NodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NodeRequest) XXX_Merge ¶
func (m *NodeRequest) XXX_Merge(src proto.Message)
func (*NodeRequest) XXX_Size ¶
func (m *NodeRequest) XXX_Size() int
func (*NodeRequest) XXX_Unmarshal ¶
func (m *NodeRequest) XXX_Unmarshal(b []byte) error
type NodeResponse ¶
type NodeResponse struct { Notified bool `protobuf:"varint,1,opt,name=notified,proto3" json:"notified,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*NodeResponse) Descriptor ¶
func (*NodeResponse) Descriptor() ([]byte, []int)
func (*NodeResponse) GetNotified ¶
func (m *NodeResponse) GetNotified() bool
func (*NodeResponse) ProtoMessage ¶
func (*NodeResponse) ProtoMessage()
func (*NodeResponse) Reset ¶
func (m *NodeResponse) Reset()
func (*NodeResponse) String ¶
func (m *NodeResponse) String() string
func (*NodeResponse) XXX_DiscardUnknown ¶
func (m *NodeResponse) XXX_DiscardUnknown()
func (*NodeResponse) XXX_Marshal ¶
func (m *NodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NodeResponse) XXX_Merge ¶
func (m *NodeResponse) XXX_Merge(src proto.Message)
func (*NodeResponse) XXX_Size ¶
func (m *NodeResponse) XXX_Size() int
func (*NodeResponse) XXX_Unmarshal ¶
func (m *NodeResponse) XXX_Unmarshal(b []byte) error
type NodeServiceClient ¶
type NodeServiceClient interface { GetPredecessor(ctx context.Context, in *NodeRequest, opts ...grpc.CallOption) (*Node, error) GetSuccessorList(ctx context.Context, in *NodeRequest, opts ...grpc.CallOption) (*SuccessorResponse, error) FindSuccessor(ctx context.Context, in *NodeRequest, opts ...grpc.CallOption) (*Node, error) Notify(ctx context.Context, in *NodeRequest, opts ...grpc.CallOption) (*Node, error) }
NodeServiceClient is the client API for NodeService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewNodeServiceClient ¶
func NewNodeServiceClient(cc *grpc.ClientConn) NodeServiceClient
type NodeServiceServer ¶
type NodeServiceServer interface { GetPredecessor(context.Context, *NodeRequest) (*Node, error) GetSuccessorList(context.Context, *NodeRequest) (*SuccessorResponse, error) FindSuccessor(context.Context, *NodeRequest) (*Node, error) Notify(context.Context, *NodeRequest) (*Node, error) }
NodeServiceServer is the server API for NodeService service.
type SuccessorResponse ¶
type SuccessorResponse struct { Successorlist []*Node `protobuf:"bytes,1,rep,name=successorlist,proto3" json:"successorlist,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*SuccessorResponse) Descriptor ¶
func (*SuccessorResponse) Descriptor() ([]byte, []int)
func (*SuccessorResponse) GetSuccessorlist ¶
func (m *SuccessorResponse) GetSuccessorlist() []*Node
func (*SuccessorResponse) ProtoMessage ¶
func (*SuccessorResponse) ProtoMessage()
func (*SuccessorResponse) Reset ¶
func (m *SuccessorResponse) Reset()
func (*SuccessorResponse) String ¶
func (m *SuccessorResponse) String() string
func (*SuccessorResponse) XXX_DiscardUnknown ¶
func (m *SuccessorResponse) XXX_DiscardUnknown()
func (*SuccessorResponse) XXX_Marshal ¶
func (m *SuccessorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SuccessorResponse) XXX_Merge ¶
func (m *SuccessorResponse) XXX_Merge(src proto.Message)
func (*SuccessorResponse) XXX_Size ¶
func (m *SuccessorResponse) XXX_Size() int
func (*SuccessorResponse) XXX_Unmarshal ¶
func (m *SuccessorResponse) XXX_Unmarshal(b []byte) error
type UnimplementedAddServiceServer ¶
type UnimplementedAddServiceServer struct { }
UnimplementedAddServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedAddServiceServer) Delete ¶
func (*UnimplementedAddServiceServer) Delete(ctx context.Context, req *KVRequest) (*KVResponse, error)
func (*UnimplementedAddServiceServer) Get ¶
func (*UnimplementedAddServiceServer) Get(ctx context.Context, req *KVRequest) (*KVResponse, error)
func (*UnimplementedAddServiceServer) Ping ¶
func (*UnimplementedAddServiceServer) Ping(ctx context.Context, req *KVRequest) (*KVResponse, error)
func (*UnimplementedAddServiceServer) Put ¶
func (*UnimplementedAddServiceServer) Put(ctx context.Context, req *KVRequest) (*KVResponse, error)
type UnimplementedNodeServiceServer ¶
type UnimplementedNodeServiceServer struct { }
UnimplementedNodeServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedNodeServiceServer) FindSuccessor ¶
func (*UnimplementedNodeServiceServer) FindSuccessor(ctx context.Context, req *NodeRequest) (*Node, error)
func (*UnimplementedNodeServiceServer) GetPredecessor ¶
func (*UnimplementedNodeServiceServer) GetPredecessor(ctx context.Context, req *NodeRequest) (*Node, error)
func (*UnimplementedNodeServiceServer) GetSuccessorList ¶
func (*UnimplementedNodeServiceServer) GetSuccessorList(ctx context.Context, req *NodeRequest) (*SuccessorResponse, error)
func (*UnimplementedNodeServiceServer) Notify ¶
func (*UnimplementedNodeServiceServer) Notify(ctx context.Context, req *NodeRequest) (*Node, error)