kv_client

package
v0.0.0-...-e532b39 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthHealthcheck = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowHealthcheck   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthKvClientApi = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowKvClientApi   = fmt.Errorf("proto: integer overflow")
)
View Source
var ClientRpcStatus_name = map[int32]string{
	0: "OK",
	1: "NOT_LEADER",
}
View Source
var ClientRpcStatus_value = map[string]int32{
	"OK":         0,
	"NOT_LEADER": 1,
}
View Source
var HealthCheckResponse_ServingStatus_name = map[int32]string{
	0: "UNKNOWN",
	1: "SERVING",
	2: "NOT_SERVING",
}
View Source
var HealthCheckResponse_ServingStatus_value = map[string]int32{
	"UNKNOWN":     0,
	"SERVING":     1,
	"NOT_SERVING": 2,
}

Functions

func RegisterClientServer

func RegisterClientServer(s *grpc.Server, srv ClientServer)

func RegisterHealthServer

func RegisterHealthServer(s *grpc.Server, srv HealthServer)

func RegisterKVStoreServer

func RegisterKVStoreServer(s *grpc.Server, srv KVStoreServer)

Types

type Address

type Address struct {
	Host                 string   `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Port                 uint32   `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Address) Descriptor

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

func (*Address) GetHost

func (m *Address) GetHost() string

func (*Address) GetPort

func (m *Address) GetPort() uint32

func (*Address) Marshal

func (m *Address) Marshal() (dAtA []byte, err error)

func (*Address) MarshalTo

func (m *Address) MarshalTo(dAtA []byte) (int, error)

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) Reset

func (m *Address) Reset()

func (*Address) Size

func (m *Address) Size() (n int)

func (*Address) String

func (m *Address) String() string

func (*Address) Unmarshal

func (m *Address) Unmarshal(dAtA []byte) error

func (*Address) XXX_DiscardUnknown

func (m *Address) XXX_DiscardUnknown()

func (*Address) XXX_Marshal

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

func (*Address) XXX_Merge

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

func (*Address) XXX_Size

func (m *Address) XXX_Size() int

func (*Address) XXX_Unmarshal

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

type ClientClient

type ClientClient interface {
	RegisterClient(ctx context.Context, in *RegisterClientReq, opts ...grpc.CallOption) (*RegisterClientRes, error)
	ExecuteCmd(ctx context.Context, in *ClientCmdReq, opts ...grpc.CallOption) (*ClientCmdRes, error)
	Query(ctx context.Context, in *ClientQueryReq, opts ...grpc.CallOption) (*ClientQueryRes, error)
}

ClientClient is the client API for Client service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewClientClient

func NewClientClient(cc *grpc.ClientConn) ClientClient

type ClientCmdReq

type ClientCmdReq struct {
	ClientId       uint64 `protobuf:"varint,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
	SequenceNumber uint64 `protobuf:"varint,2,opt,name=sequenceNumber,proto3" json:"sequenceNumber,omitempty"`
	// Types that are valid to be assigned to Command:
	//	*ClientCmdReq_PutReq
	//	*ClientCmdReq_DelReq
	Command              isClientCmdReq_Command `protobuf_oneof:"command"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (*ClientCmdReq) Descriptor

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

func (*ClientCmdReq) GetClientId

func (m *ClientCmdReq) GetClientId() uint64

func (*ClientCmdReq) GetCommand

func (m *ClientCmdReq) GetCommand() isClientCmdReq_Command

func (*ClientCmdReq) GetDelReq

func (m *ClientCmdReq) GetDelReq() *DelReq

func (*ClientCmdReq) GetPutReq

func (m *ClientCmdReq) GetPutReq() *PutReq

func (*ClientCmdReq) GetSequenceNumber

func (m *ClientCmdReq) GetSequenceNumber() uint64

func (*ClientCmdReq) Marshal

func (m *ClientCmdReq) Marshal() (dAtA []byte, err error)

func (*ClientCmdReq) MarshalTo

func (m *ClientCmdReq) MarshalTo(dAtA []byte) (int, error)

func (*ClientCmdReq) ProtoMessage

func (*ClientCmdReq) ProtoMessage()

func (*ClientCmdReq) Reset

func (m *ClientCmdReq) Reset()

func (*ClientCmdReq) Size

func (m *ClientCmdReq) Size() (n int)

func (*ClientCmdReq) String

func (m *ClientCmdReq) String() string

func (*ClientCmdReq) Unmarshal

func (m *ClientCmdReq) Unmarshal(dAtA []byte) error

func (*ClientCmdReq) XXX_DiscardUnknown

func (m *ClientCmdReq) XXX_DiscardUnknown()

func (*ClientCmdReq) XXX_Marshal

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

func (*ClientCmdReq) XXX_Merge

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

func (*ClientCmdReq) XXX_OneofFuncs

func (*ClientCmdReq) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*ClientCmdReq) XXX_Size

func (m *ClientCmdReq) XXX_Size() int

func (*ClientCmdReq) XXX_Unmarshal

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

type ClientCmdReq_DelReq

type ClientCmdReq_DelReq struct {
	DelReq *DelReq `protobuf:"bytes,4,opt,name=delReq,proto3,oneof"`
}

func (*ClientCmdReq_DelReq) MarshalTo

func (m *ClientCmdReq_DelReq) MarshalTo(dAtA []byte) (int, error)

func (*ClientCmdReq_DelReq) Size

func (m *ClientCmdReq_DelReq) Size() (n int)

type ClientCmdReq_PutReq

type ClientCmdReq_PutReq struct {
	PutReq *PutReq `protobuf:"bytes,3,opt,name=putReq,proto3,oneof"`
}

func (*ClientCmdReq_PutReq) MarshalTo

func (m *ClientCmdReq_PutReq) MarshalTo(dAtA []byte) (int, error)

func (*ClientCmdReq_PutReq) Size

func (m *ClientCmdReq_PutReq) Size() (n int)

type ClientCmdRes

type ClientCmdRes struct {
	Status     ClientRpcStatus `protobuf:"varint,1,opt,name=status,proto3,enum=kv_client.ClientRpcStatus" json:"status,omitempty"`
	LeaderHint *Address        `protobuf:"bytes,2,opt,name=leaderHint,proto3" json:"leaderHint,omitempty"`
	// Types that are valid to be assigned to Response:
	//	*ClientCmdRes_PutRes
	//	*ClientCmdRes_DelRes
	Response             isClientCmdRes_Response `protobuf_oneof:"response"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*ClientCmdRes) Descriptor

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

func (*ClientCmdRes) GetDelRes

func (m *ClientCmdRes) GetDelRes() *DelRes

func (*ClientCmdRes) GetLeaderHint

func (m *ClientCmdRes) GetLeaderHint() *Address

func (*ClientCmdRes) GetPutRes

func (m *ClientCmdRes) GetPutRes() *PutRes

func (*ClientCmdRes) GetResponse

func (m *ClientCmdRes) GetResponse() isClientCmdRes_Response

func (*ClientCmdRes) GetStatus

func (m *ClientCmdRes) GetStatus() ClientRpcStatus

func (*ClientCmdRes) Marshal

func (m *ClientCmdRes) Marshal() (dAtA []byte, err error)

func (*ClientCmdRes) MarshalTo

func (m *ClientCmdRes) MarshalTo(dAtA []byte) (int, error)

func (*ClientCmdRes) ProtoMessage

func (*ClientCmdRes) ProtoMessage()

func (*ClientCmdRes) Reset

func (m *ClientCmdRes) Reset()

func (*ClientCmdRes) Size

func (m *ClientCmdRes) Size() (n int)

func (*ClientCmdRes) String

func (m *ClientCmdRes) String() string

func (*ClientCmdRes) Unmarshal

func (m *ClientCmdRes) Unmarshal(dAtA []byte) error

func (*ClientCmdRes) XXX_DiscardUnknown

func (m *ClientCmdRes) XXX_DiscardUnknown()

func (*ClientCmdRes) XXX_Marshal

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

func (*ClientCmdRes) XXX_Merge

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

func (*ClientCmdRes) XXX_OneofFuncs

func (*ClientCmdRes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*ClientCmdRes) XXX_Size

func (m *ClientCmdRes) XXX_Size() int

func (*ClientCmdRes) XXX_Unmarshal

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

type ClientCmdRes_DelRes

type ClientCmdRes_DelRes struct {
	DelRes *DelRes `protobuf:"bytes,4,opt,name=delRes,proto3,oneof"`
}

func (*ClientCmdRes_DelRes) MarshalTo

func (m *ClientCmdRes_DelRes) MarshalTo(dAtA []byte) (int, error)

func (*ClientCmdRes_DelRes) Size

func (m *ClientCmdRes_DelRes) Size() (n int)

type ClientCmdRes_PutRes

type ClientCmdRes_PutRes struct {
	PutRes *PutRes `protobuf:"bytes,3,opt,name=putRes,proto3,oneof"`
}

func (*ClientCmdRes_PutRes) MarshalTo

func (m *ClientCmdRes_PutRes) MarshalTo(dAtA []byte) (int, error)

func (*ClientCmdRes_PutRes) Size

func (m *ClientCmdRes_PutRes) Size() (n int)

type ClientQueryReq

type ClientQueryReq struct {
	// Types that are valid to be assigned to Query:
	//	*ClientQueryReq_GetReq
	Query                isClientQueryReq_Query `protobuf_oneof:"query"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

func (*ClientQueryReq) Descriptor

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

func (*ClientQueryReq) GetGetReq

func (m *ClientQueryReq) GetGetReq() *GetReq

func (*ClientQueryReq) GetQuery

func (m *ClientQueryReq) GetQuery() isClientQueryReq_Query

func (*ClientQueryReq) Marshal

func (m *ClientQueryReq) Marshal() (dAtA []byte, err error)

func (*ClientQueryReq) MarshalTo

func (m *ClientQueryReq) MarshalTo(dAtA []byte) (int, error)

func (*ClientQueryReq) ProtoMessage

func (*ClientQueryReq) ProtoMessage()

func (*ClientQueryReq) Reset

func (m *ClientQueryReq) Reset()

func (*ClientQueryReq) Size

func (m *ClientQueryReq) Size() (n int)

func (*ClientQueryReq) String

func (m *ClientQueryReq) String() string

func (*ClientQueryReq) Unmarshal

func (m *ClientQueryReq) Unmarshal(dAtA []byte) error

func (*ClientQueryReq) XXX_DiscardUnknown

func (m *ClientQueryReq) XXX_DiscardUnknown()

func (*ClientQueryReq) XXX_Marshal

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

func (*ClientQueryReq) XXX_Merge

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

func (*ClientQueryReq) XXX_OneofFuncs

func (*ClientQueryReq) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*ClientQueryReq) XXX_Size

func (m *ClientQueryReq) XXX_Size() int

func (*ClientQueryReq) XXX_Unmarshal

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

type ClientQueryReq_GetReq

type ClientQueryReq_GetReq struct {
	GetReq *GetReq `protobuf:"bytes,1,opt,name=getReq,proto3,oneof"`
}

func (*ClientQueryReq_GetReq) MarshalTo

func (m *ClientQueryReq_GetReq) MarshalTo(dAtA []byte) (int, error)

func (*ClientQueryReq_GetReq) Size

func (m *ClientQueryReq_GetReq) Size() (n int)

type ClientQueryRes

type ClientQueryRes struct {
	Status     ClientRpcStatus `protobuf:"varint,1,opt,name=status,proto3,enum=kv_client.ClientRpcStatus" json:"status,omitempty"`
	LeaderHint *Address        `protobuf:"bytes,2,opt,name=leaderHint,proto3" json:"leaderHint,omitempty"`
	// Types that are valid to be assigned to Result:
	//	*ClientQueryRes_Value
	Result               isClientQueryRes_Result `protobuf_oneof:"result"`
	XXX_NoUnkeyedLiteral struct{}                `json:"-"`
	XXX_unrecognized     []byte                  `json:"-"`
	XXX_sizecache        int32                   `json:"-"`
}

func (*ClientQueryRes) Descriptor

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

func (*ClientQueryRes) GetLeaderHint

func (m *ClientQueryRes) GetLeaderHint() *Address

func (*ClientQueryRes) GetResult

func (m *ClientQueryRes) GetResult() isClientQueryRes_Result

func (*ClientQueryRes) GetStatus

func (m *ClientQueryRes) GetStatus() ClientRpcStatus

func (*ClientQueryRes) GetValue

func (m *ClientQueryRes) GetValue() *Value

func (*ClientQueryRes) Marshal

func (m *ClientQueryRes) Marshal() (dAtA []byte, err error)

func (*ClientQueryRes) MarshalTo

func (m *ClientQueryRes) MarshalTo(dAtA []byte) (int, error)

func (*ClientQueryRes) ProtoMessage

func (*ClientQueryRes) ProtoMessage()

func (*ClientQueryRes) Reset

func (m *ClientQueryRes) Reset()

func (*ClientQueryRes) Size

func (m *ClientQueryRes) Size() (n int)

func (*ClientQueryRes) String

func (m *ClientQueryRes) String() string

func (*ClientQueryRes) Unmarshal

func (m *ClientQueryRes) Unmarshal(dAtA []byte) error

func (*ClientQueryRes) XXX_DiscardUnknown

func (m *ClientQueryRes) XXX_DiscardUnknown()

func (*ClientQueryRes) XXX_Marshal

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

func (*ClientQueryRes) XXX_Merge

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

func (*ClientQueryRes) XXX_OneofFuncs

func (*ClientQueryRes) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})

XXX_OneofFuncs is for the internal use of the proto package.

func (*ClientQueryRes) XXX_Size

func (m *ClientQueryRes) XXX_Size() int

func (*ClientQueryRes) XXX_Unmarshal

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

type ClientQueryRes_Value

type ClientQueryRes_Value struct {
	Value *Value `protobuf:"bytes,3,opt,name=value,proto3,oneof"`
}

func (*ClientQueryRes_Value) MarshalTo

func (m *ClientQueryRes_Value) MarshalTo(dAtA []byte) (int, error)

func (*ClientQueryRes_Value) Size

func (m *ClientQueryRes_Value) Size() (n int)

type ClientRpcStatus

type ClientRpcStatus int32
const (
	ClientRpcStatus_OK         ClientRpcStatus = 0
	ClientRpcStatus_NOT_LEADER ClientRpcStatus = 1
)

func (ClientRpcStatus) EnumDescriptor

func (ClientRpcStatus) EnumDescriptor() ([]byte, []int)

func (ClientRpcStatus) String

func (x ClientRpcStatus) String() string

type ClientServer

type ClientServer interface {
	RegisterClient(context.Context, *RegisterClientReq) (*RegisterClientRes, error)
	ExecuteCmd(context.Context, *ClientCmdReq) (*ClientCmdRes, error)
	Query(context.Context, *ClientQueryReq) (*ClientQueryRes, error)
}

ClientServer is the server API for Client service.

type DelReq

type DelReq struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DelReq) Descriptor

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

func (*DelReq) GetKey

func (m *DelReq) GetKey() string

func (*DelReq) Marshal

func (m *DelReq) Marshal() (dAtA []byte, err error)

func (*DelReq) MarshalTo

func (m *DelReq) MarshalTo(dAtA []byte) (int, error)

func (*DelReq) ProtoMessage

func (*DelReq) ProtoMessage()

func (*DelReq) Reset

func (m *DelReq) Reset()

func (*DelReq) Size

func (m *DelReq) Size() (n int)

func (*DelReq) String

func (m *DelReq) String() string

func (*DelReq) Unmarshal

func (m *DelReq) Unmarshal(dAtA []byte) error

func (*DelReq) XXX_DiscardUnknown

func (m *DelReq) XXX_DiscardUnknown()

func (*DelReq) XXX_Marshal

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

func (*DelReq) XXX_Merge

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

func (*DelReq) XXX_Size

func (m *DelReq) XXX_Size() int

func (*DelReq) XXX_Unmarshal

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

type DelRes

type DelRes struct {
	Ok                   bool     `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DelRes) Descriptor

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

func (*DelRes) GetOk

func (m *DelRes) GetOk() bool

func (*DelRes) Marshal

func (m *DelRes) Marshal() (dAtA []byte, err error)

func (*DelRes) MarshalTo

func (m *DelRes) MarshalTo(dAtA []byte) (int, error)

func (*DelRes) ProtoMessage

func (*DelRes) ProtoMessage()

func (*DelRes) Reset

func (m *DelRes) Reset()

func (*DelRes) Size

func (m *DelRes) Size() (n int)

func (*DelRes) String

func (m *DelRes) String() string

func (*DelRes) Unmarshal

func (m *DelRes) Unmarshal(dAtA []byte) error

func (*DelRes) XXX_DiscardUnknown

func (m *DelRes) XXX_DiscardUnknown()

func (*DelRes) XXX_Marshal

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

func (*DelRes) XXX_Merge

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

func (*DelRes) XXX_Size

func (m *DelRes) XXX_Size() int

func (*DelRes) XXX_Unmarshal

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

type GetReq

type GetReq struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetReq) Descriptor

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

func (*GetReq) GetKey

func (m *GetReq) GetKey() string

func (*GetReq) Marshal

func (m *GetReq) Marshal() (dAtA []byte, err error)

func (*GetReq) MarshalTo

func (m *GetReq) MarshalTo(dAtA []byte) (int, error)

func (*GetReq) ProtoMessage

func (*GetReq) ProtoMessage()

func (*GetReq) Reset

func (m *GetReq) Reset()

func (*GetReq) Size

func (m *GetReq) Size() (n int)

func (*GetReq) String

func (m *GetReq) String() string

func (*GetReq) Unmarshal

func (m *GetReq) Unmarshal(dAtA []byte) error

func (*GetReq) XXX_DiscardUnknown

func (m *GetReq) XXX_DiscardUnknown()

func (*GetReq) XXX_Marshal

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

func (*GetReq) XXX_Merge

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

func (*GetReq) XXX_Size

func (m *GetReq) XXX_Size() int

func (*GetReq) XXX_Unmarshal

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

type HealthCheckRequest

type HealthCheckRequest struct {
	Service              string   `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*HealthCheckRequest) Descriptor

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

func (*HealthCheckRequest) GetService

func (m *HealthCheckRequest) GetService() string

func (*HealthCheckRequest) Marshal

func (m *HealthCheckRequest) Marshal() (dAtA []byte, err error)

func (*HealthCheckRequest) MarshalTo

func (m *HealthCheckRequest) MarshalTo(dAtA []byte) (int, error)

func (*HealthCheckRequest) ProtoMessage

func (*HealthCheckRequest) ProtoMessage()

func (*HealthCheckRequest) Reset

func (m *HealthCheckRequest) Reset()

func (*HealthCheckRequest) Size

func (m *HealthCheckRequest) Size() (n int)

func (*HealthCheckRequest) String

func (m *HealthCheckRequest) String() string

func (*HealthCheckRequest) Unmarshal

func (m *HealthCheckRequest) Unmarshal(dAtA []byte) error

func (*HealthCheckRequest) XXX_DiscardUnknown

func (m *HealthCheckRequest) XXX_DiscardUnknown()

func (*HealthCheckRequest) XXX_Marshal

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

func (*HealthCheckRequest) XXX_Merge

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

func (*HealthCheckRequest) XXX_Size

func (m *HealthCheckRequest) XXX_Size() int

func (*HealthCheckRequest) XXX_Unmarshal

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

type HealthCheckResponse

type HealthCheckResponse struct {
	Status               HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=kv_client.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                          `json:"-"`
	XXX_unrecognized     []byte                            `json:"-"`
	XXX_sizecache        int32                             `json:"-"`
}

func (*HealthCheckResponse) Descriptor

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

func (*HealthCheckResponse) GetStatus

func (*HealthCheckResponse) Marshal

func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error)

func (*HealthCheckResponse) MarshalTo

func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error)

func (*HealthCheckResponse) ProtoMessage

func (*HealthCheckResponse) ProtoMessage()

func (*HealthCheckResponse) Reset

func (m *HealthCheckResponse) Reset()

func (*HealthCheckResponse) Size

func (m *HealthCheckResponse) Size() (n int)

func (*HealthCheckResponse) String

func (m *HealthCheckResponse) String() string

func (*HealthCheckResponse) Unmarshal

func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error

func (*HealthCheckResponse) XXX_DiscardUnknown

func (m *HealthCheckResponse) XXX_DiscardUnknown()

func (*HealthCheckResponse) XXX_Marshal

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

func (*HealthCheckResponse) XXX_Merge

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

func (*HealthCheckResponse) XXX_Size

func (m *HealthCheckResponse) XXX_Size() int

func (*HealthCheckResponse) XXX_Unmarshal

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

type HealthCheckResponse_ServingStatus

type HealthCheckResponse_ServingStatus int32
const (
	HealthCheckResponse_UNKNOWN     HealthCheckResponse_ServingStatus = 0
	HealthCheckResponse_SERVING     HealthCheckResponse_ServingStatus = 1
	HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2
)

func (HealthCheckResponse_ServingStatus) EnumDescriptor

func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int)

func (HealthCheckResponse_ServingStatus) String

type HealthClient

type HealthClient interface {
	Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
}

HealthClient is the client API for Health service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewHealthClient

func NewHealthClient(cc *grpc.ClientConn) HealthClient

type HealthServer

type HealthServer interface {
	Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
}

HealthServer is the server API for Health service.

type KVStoreClient

type KVStoreClient interface {
	Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Value, error)
	Put(ctx context.Context, in *PutReq, opts ...grpc.CallOption) (*PutRes, error)
	Delete(ctx context.Context, in *DelReq, opts ...grpc.CallOption) (*DelRes, error)
}

KVStoreClient is the client API for KVStore service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewKVStoreClient

func NewKVStoreClient(cc *grpc.ClientConn) KVStoreClient

type KVStoreServer

type KVStoreServer interface {
	Get(context.Context, *GetReq) (*Value, error)
	Put(context.Context, *PutReq) (*PutRes, error)
	Delete(context.Context, *DelReq) (*DelRes, error)
}

KVStoreServer is the server API for KVStore service.

type PutReq

type PutReq struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value                []byte   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PutReq) Descriptor

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

func (*PutReq) GetKey

func (m *PutReq) GetKey() string

func (*PutReq) GetValue

func (m *PutReq) GetValue() []byte

func (*PutReq) Marshal

func (m *PutReq) Marshal() (dAtA []byte, err error)

func (*PutReq) MarshalTo

func (m *PutReq) MarshalTo(dAtA []byte) (int, error)

func (*PutReq) ProtoMessage

func (*PutReq) ProtoMessage()

func (*PutReq) Reset

func (m *PutReq) Reset()

func (*PutReq) Size

func (m *PutReq) Size() (n int)

func (*PutReq) String

func (m *PutReq) String() string

func (*PutReq) Unmarshal

func (m *PutReq) Unmarshal(dAtA []byte) error

func (*PutReq) XXX_DiscardUnknown

func (m *PutReq) XXX_DiscardUnknown()

func (*PutReq) XXX_Marshal

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

func (*PutReq) XXX_Merge

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

func (*PutReq) XXX_Size

func (m *PutReq) XXX_Size() int

func (*PutReq) XXX_Unmarshal

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

type PutRes

type PutRes struct {
	Success              bool     `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PutRes) Descriptor

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

func (*PutRes) GetSuccess

func (m *PutRes) GetSuccess() bool

func (*PutRes) Marshal

func (m *PutRes) Marshal() (dAtA []byte, err error)

func (*PutRes) MarshalTo

func (m *PutRes) MarshalTo(dAtA []byte) (int, error)

func (*PutRes) ProtoMessage

func (*PutRes) ProtoMessage()

func (*PutRes) Reset

func (m *PutRes) Reset()

func (*PutRes) Size

func (m *PutRes) Size() (n int)

func (*PutRes) String

func (m *PutRes) String() string

func (*PutRes) Unmarshal

func (m *PutRes) Unmarshal(dAtA []byte) error

func (*PutRes) XXX_DiscardUnknown

func (m *PutRes) XXX_DiscardUnknown()

func (*PutRes) XXX_Marshal

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

func (*PutRes) XXX_Merge

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

func (*PutRes) XXX_Size

func (m *PutRes) XXX_Size() int

func (*PutRes) XXX_Unmarshal

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

type RegisterClientReq

type RegisterClientReq struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RegisterClientReq) Descriptor

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

func (*RegisterClientReq) Marshal

func (m *RegisterClientReq) Marshal() (dAtA []byte, err error)

func (*RegisterClientReq) MarshalTo

func (m *RegisterClientReq) MarshalTo(dAtA []byte) (int, error)

func (*RegisterClientReq) ProtoMessage

func (*RegisterClientReq) ProtoMessage()

func (*RegisterClientReq) Reset

func (m *RegisterClientReq) Reset()

func (*RegisterClientReq) Size

func (m *RegisterClientReq) Size() (n int)

func (*RegisterClientReq) String

func (m *RegisterClientReq) String() string

func (*RegisterClientReq) Unmarshal

func (m *RegisterClientReq) Unmarshal(dAtA []byte) error

func (*RegisterClientReq) XXX_DiscardUnknown

func (m *RegisterClientReq) XXX_DiscardUnknown()

func (*RegisterClientReq) XXX_Marshal

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

func (*RegisterClientReq) XXX_Merge

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

func (*RegisterClientReq) XXX_Size

func (m *RegisterClientReq) XXX_Size() int

func (*RegisterClientReq) XXX_Unmarshal

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

type RegisterClientRes

type RegisterClientRes struct {
	Status               ClientRpcStatus `protobuf:"varint,1,opt,name=status,proto3,enum=kv_client.ClientRpcStatus" json:"status,omitempty"`
	ClientId             uint64          `protobuf:"varint,2,opt,name=clientId,proto3" json:"clientId,omitempty"`
	LeaderHint           *Address        `protobuf:"bytes,3,opt,name=leaderHint,proto3" json:"leaderHint,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*RegisterClientRes) Descriptor

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

func (*RegisterClientRes) GetClientId

func (m *RegisterClientRes) GetClientId() uint64

func (*RegisterClientRes) GetLeaderHint

func (m *RegisterClientRes) GetLeaderHint() *Address

func (*RegisterClientRes) GetStatus

func (m *RegisterClientRes) GetStatus() ClientRpcStatus

func (*RegisterClientRes) Marshal

func (m *RegisterClientRes) Marshal() (dAtA []byte, err error)

func (*RegisterClientRes) MarshalTo

func (m *RegisterClientRes) MarshalTo(dAtA []byte) (int, error)

func (*RegisterClientRes) ProtoMessage

func (*RegisterClientRes) ProtoMessage()

func (*RegisterClientRes) Reset

func (m *RegisterClientRes) Reset()

func (*RegisterClientRes) Size

func (m *RegisterClientRes) Size() (n int)

func (*RegisterClientRes) String

func (m *RegisterClientRes) String() string

func (*RegisterClientRes) Unmarshal

func (m *RegisterClientRes) Unmarshal(dAtA []byte) error

func (*RegisterClientRes) XXX_DiscardUnknown

func (m *RegisterClientRes) XXX_DiscardUnknown()

func (*RegisterClientRes) XXX_Marshal

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

func (*RegisterClientRes) XXX_Merge

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

func (*RegisterClientRes) XXX_Size

func (m *RegisterClientRes) XXX_Size() int

func (*RegisterClientRes) XXX_Unmarshal

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

type Value

type Value struct {
	Key                  string   `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value                []byte   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Value) Descriptor

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

func (*Value) GetKey

func (m *Value) GetKey() string

func (*Value) GetValue

func (m *Value) GetValue() []byte

func (*Value) Marshal

func (m *Value) Marshal() (dAtA []byte, err error)

func (*Value) MarshalTo

func (m *Value) MarshalTo(dAtA []byte) (int, error)

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) Size

func (m *Value) Size() (n int)

func (*Value) String

func (m *Value) String() string

func (*Value) Unmarshal

func (m *Value) Unmarshal(dAtA []byte) error

func (*Value) XXX_DiscardUnknown

func (m *Value) XXX_DiscardUnknown()

func (*Value) XXX_Marshal

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

func (*Value) XXX_Merge

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

func (*Value) XXX_Size

func (m *Value) XXX_Size() int

func (*Value) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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