proto

package
v0.0.0-...-e6f5e3b Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

func (*KVRequest) GetKey

func (m *KVRequest) GetKey() string

func (*KVRequest) GetValue

func (m *KVRequest) GetValue() string

func (*KVRequest) ProtoMessage

func (*KVRequest) ProtoMessage()

func (*KVRequest) Reset

func (m *KVRequest) Reset()

func (*KVRequest) String

func (m *KVRequest) String() string

func (*KVRequest) XXX_DiscardUnknown

func (m *KVRequest) XXX_DiscardUnknown()

func (*KVRequest) XXX_Marshal

func (m *KVRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KVRequest) XXX_Merge

func (m *KVRequest) XXX_Merge(src proto.Message)

func (*KVRequest) XXX_Size

func (m *KVRequest) XXX_Size() int

func (*KVRequest) XXX_Unmarshal

func (m *KVRequest) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Node) GetIpaddr

func (m *Node) GetIpaddr() string

func (*Node) GetPort

func (m *Node) GetPort() string

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) Reset

func (m *Node) Reset()

func (*Node) String

func (m *Node) String() string

func (*Node) XXX_DiscardUnknown

func (m *Node) XXX_DiscardUnknown()

func (*Node) XXX_Marshal

func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Node) XXX_Merge

func (m *Node) XXX_Merge(src proto.Message)

func (*Node) XXX_Size

func (m *Node) XXX_Size() int

func (*Node) XXX_Unmarshal

func (m *Node) XXX_Unmarshal(b []byte) error

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) Get

func (*UnimplementedAddServiceServer) Ping

func (*UnimplementedAddServiceServer) Put

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) Notify

Jump to

Keyboard shortcuts

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