kvs

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KVSCommand_Type_name = map[int32]string{
	0: "UNKNOWN_COMMAND",
	1: "SET_METADATA",
	2: "DELETE_METADATA",
	3: "PUT_KEY_VALUE_PAIR",
	4: "DELETE_KEY_VALUE_PAIR",
}
View Source
var KVSCommand_Type_value = map[string]int32{
	"UNKNOWN_COMMAND":       0,
	"SET_METADATA":          1,
	"DELETE_METADATA":       2,
	"PUT_KEY_VALUE_PAIR":    3,
	"DELETE_KEY_VALUE_PAIR": 4,
}

Functions

func RegisterKVSServer

func RegisterKVSServer(s *grpc.Server, srv KVSServer)

Types

type KVSClient

type KVSClient interface {
	Join(ctx context.Context, in *raft.Node, opts ...grpc.CallOption) (*empty.Empty, error)
	Leave(ctx context.Context, in *raft.Node, opts ...grpc.CallOption) (*empty.Empty, error)
	GetNode(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*raft.Node, error)
	GetCluster(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*raft.Cluster, error)
	Snapshot(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	Get(ctx context.Context, in *KeyValuePair, opts ...grpc.CallOption) (*KeyValuePair, error)
	Put(ctx context.Context, in *KeyValuePair, opts ...grpc.CallOption) (*empty.Empty, error)
	Delete(ctx context.Context, in *KeyValuePair, opts ...grpc.CallOption) (*empty.Empty, error)
}

KVSClient is the client API for KVS service.

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

func NewKVSClient

func NewKVSClient(cc *grpc.ClientConn) KVSClient

type KVSCommand

type KVSCommand struct {
	Type                 KVSCommand_Type `protobuf:"varint,1,opt,name=type,proto3,enum=kvs.KVSCommand_Type" json:"type,omitempty"`
	Data                 *any.Any        `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*KVSCommand) Descriptor

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

func (*KVSCommand) GetData added in v0.5.0

func (m *KVSCommand) GetData() *any.Any

func (*KVSCommand) GetType added in v0.5.0

func (m *KVSCommand) GetType() KVSCommand_Type

func (*KVSCommand) ProtoMessage

func (*KVSCommand) ProtoMessage()

func (*KVSCommand) Reset

func (m *KVSCommand) Reset()

func (*KVSCommand) String

func (m *KVSCommand) String() string

func (*KVSCommand) XXX_DiscardUnknown

func (m *KVSCommand) XXX_DiscardUnknown()

func (*KVSCommand) XXX_Marshal

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

func (*KVSCommand) XXX_Merge

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

func (*KVSCommand) XXX_Size

func (m *KVSCommand) XXX_Size() int

func (*KVSCommand) XXX_Unmarshal

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

type KVSCommand_Type added in v0.5.0

type KVSCommand_Type int32
const (
	KVSCommand_UNKNOWN_COMMAND       KVSCommand_Type = 0
	KVSCommand_SET_METADATA          KVSCommand_Type = 1
	KVSCommand_DELETE_METADATA       KVSCommand_Type = 2
	KVSCommand_PUT_KEY_VALUE_PAIR    KVSCommand_Type = 3
	KVSCommand_DELETE_KEY_VALUE_PAIR KVSCommand_Type = 4
)

func (KVSCommand_Type) EnumDescriptor added in v0.5.0

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

func (KVSCommand_Type) String added in v0.5.0

func (x KVSCommand_Type) String() string

type KVSServer

KVSServer is the server API for KVS service.

type KeyValuePair

type KeyValuePair struct {
	Key                  []byte   `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 (*KeyValuePair) Descriptor

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

func (*KeyValuePair) GetKey

func (m *KeyValuePair) GetKey() []byte

func (*KeyValuePair) GetValue

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

func (*KeyValuePair) ProtoMessage

func (*KeyValuePair) ProtoMessage()

func (*KeyValuePair) Reset

func (m *KeyValuePair) Reset()

func (*KeyValuePair) String

func (m *KeyValuePair) String() string

func (*KeyValuePair) XXX_DiscardUnknown

func (m *KeyValuePair) XXX_DiscardUnknown()

func (*KeyValuePair) XXX_Marshal

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

func (*KeyValuePair) XXX_Merge

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

func (*KeyValuePair) XXX_Size

func (m *KeyValuePair) XXX_Size() int

func (*KeyValuePair) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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