kvs

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2017 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package kvs is a generated protocol buffer package.

It is generated from these files:

kvs/kvs.proto

It has these top-level messages:

Key
Value
Entry
PutResponse
DeleteResponse
ListRequest

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterKvsServer

func RegisterKvsServer(s *grpc.Server, srv KvsServer)

Types

type DeleteResponse

type DeleteResponse struct {
}

func (*DeleteResponse) Descriptor

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

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) Reset

func (m *DeleteResponse) Reset()

func (*DeleteResponse) String

func (m *DeleteResponse) String() string

type Entry

type Entry struct {
	Key   *Key   `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	Value *Value `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
}

Entry defines a pair of key and value as an entry in the KVS.

func (*Entry) Descriptor

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

func (*Entry) GetKey

func (m *Entry) GetKey() *Key

func (*Entry) GetValue

func (m *Entry) GetValue() *Value

func (*Entry) ProtoMessage

func (*Entry) ProtoMessage()

func (*Entry) Reset

func (m *Entry) Reset()

func (*Entry) String

func (m *Entry) String() string

type Key

type Key struct {
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}

Key defines a simple key in the KVS.

func (*Key) Descriptor

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

func (*Key) GetName

func (m *Key) GetName() string

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) Reset

func (m *Key) Reset()

func (*Key) String

func (m *Key) String() string

type KvsClient

type KvsClient interface {
	Get(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Value, error)
	Put(ctx context.Context, in *Entry, opts ...grpc.CallOption) (*PutResponse, error)
	Delete(ctx context.Context, in *Key, opts ...grpc.CallOption) (*DeleteResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (Kvs_ListClient, error)
}

func NewKvsClient

func NewKvsClient(cc *grpc.ClientConn) KvsClient

type KvsServer

type KvsServer interface {
	Get(context.Context, *Key) (*Value, error)
	Put(context.Context, *Entry) (*PutResponse, error)
	Delete(context.Context, *Key) (*DeleteResponse, error)
	List(*ListRequest, Kvs_ListServer) error
}

type Kvs_ListClient

type Kvs_ListClient interface {
	Recv() (*Key, error)
	grpc.ClientStream
}

type Kvs_ListServer

type Kvs_ListServer interface {
	Send(*Key) error
	grpc.ServerStream
}

type ListRequest

type ListRequest struct {
}

func (*ListRequest) Descriptor

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

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset

func (m *ListRequest) Reset()

func (*ListRequest) String

func (m *ListRequest) String() string

type PutResponse

type PutResponse struct {
}

Define empty requests/responses.

func (*PutResponse) Descriptor

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

func (*PutResponse) ProtoMessage

func (*PutResponse) ProtoMessage()

func (*PutResponse) Reset

func (m *PutResponse) Reset()

func (*PutResponse) String

func (m *PutResponse) String() string

type Value

type Value struct {
	Field  string   `protobuf:"bytes,1,opt,name=field" json:"field,omitempty"`
	Key    string   `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
	Shares []string `protobuf:"bytes,3,rep,name=shares" json:"shares,omitempty"`
}

Value represents a share in SSS.

func (*Value) Descriptor

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

func (*Value) GetField

func (m *Value) GetField() string

func (*Value) GetKey

func (m *Value) GetKey() string

func (*Value) GetShares

func (m *Value) GetShares() []string

func (*Value) ProtoMessage

func (*Value) ProtoMessage()

func (*Value) Reset

func (m *Value) Reset()

func (*Value) String

func (m *Value) String() string

Jump to

Keyboard shortcuts

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