proto

package
v0.0.0-...-0cd0da9 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package proto is a generated protocol buffer package.

It is generated from these files:

rpc.proto

It has these top-level messages:

SetOptArg
SetOptRet
GetOptArg
GetOptRet
DelOptArg
DelOptRet

Index

Constants

This section is empty.

Variables

View Source
var RCODE_name = map[int32]string{
	0: "SUCCESS",
	1: "FAILURE",
}
View Source
var RCODE_value = map[string]int32{
	"SUCCESS": 0,
	"FAILURE": 1,
}

Functions

func RegisterRpcServiceServer

func RegisterRpcServiceServer(s *grpc.Server, srv RpcServiceServer)

Types

type DelOptArg

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

func (*DelOptArg) Descriptor

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

func (*DelOptArg) ProtoMessage

func (*DelOptArg) ProtoMessage()

func (*DelOptArg) Reset

func (m *DelOptArg) Reset()

func (*DelOptArg) String

func (m *DelOptArg) String() string

type DelOptRet

type DelOptRet struct {
	Code RCODE `protobuf:"varint,1,opt,name=code,enum=proto.RCODE" json:"code,omitempty"`
}

func (*DelOptRet) Descriptor

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

func (*DelOptRet) ProtoMessage

func (*DelOptRet) ProtoMessage()

func (*DelOptRet) Reset

func (m *DelOptRet) Reset()

func (*DelOptRet) String

func (m *DelOptRet) String() string

type GetOptArg

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

func (*GetOptArg) Descriptor

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

func (*GetOptArg) ProtoMessage

func (*GetOptArg) ProtoMessage()

func (*GetOptArg) Reset

func (m *GetOptArg) Reset()

func (*GetOptArg) String

func (m *GetOptArg) String() string

type GetOptRet

type GetOptRet struct {
	Code RCODE  `protobuf:"varint,1,opt,name=code,enum=proto.RCODE" json:"code,omitempty"`
	Val  []byte `protobuf:"bytes,2,opt,name=val,proto3" json:"val,omitempty"`
}

func (*GetOptRet) Descriptor

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

func (*GetOptRet) ProtoMessage

func (*GetOptRet) ProtoMessage()

func (*GetOptRet) Reset

func (m *GetOptRet) Reset()

func (*GetOptRet) String

func (m *GetOptRet) String() string

type RCODE

type RCODE int32

return code

const (
	RCODE_SUCCESS RCODE = 0
	RCODE_FAILURE RCODE = 1
)

func (RCODE) EnumDescriptor

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

func (RCODE) String

func (x RCODE) String() string

type RpcServiceClient

type RpcServiceClient interface {
	Set(ctx context.Context, in *SetOptArg, opts ...grpc.CallOption) (*SetOptRet, error)
	Get(ctx context.Context, in *GetOptArg, opts ...grpc.CallOption) (*GetOptRet, error)
	Delete(ctx context.Context, in *DelOptArg, opts ...grpc.CallOption) (*DelOptRet, error)
}

func NewRpcServiceClient

func NewRpcServiceClient(cc *grpc.ClientConn) RpcServiceClient

type RpcServiceServer

type RpcServiceServer interface {
	Set(context.Context, *SetOptArg) (*SetOptRet, error)
	Get(context.Context, *GetOptArg) (*GetOptRet, error)
	Delete(context.Context, *DelOptArg) (*DelOptRet, error)
}

type SetOptArg

type SetOptArg struct {
	Key string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"`
	Val []byte `protobuf:"bytes,2,opt,name=val,proto3" json:"val,omitempty"`
	Ttl uint64 `protobuf:"varint,3,opt,name=ttl" json:"ttl,omitempty"`
}

func (*SetOptArg) Descriptor

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

func (*SetOptArg) ProtoMessage

func (*SetOptArg) ProtoMessage()

func (*SetOptArg) Reset

func (m *SetOptArg) Reset()

func (*SetOptArg) String

func (m *SetOptArg) String() string

type SetOptRet

type SetOptRet struct {
	Code RCODE `protobuf:"varint,1,opt,name=code,enum=proto.RCODE" json:"code,omitempty"`
}

func (*SetOptRet) Descriptor

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

func (*SetOptRet) ProtoMessage

func (*SetOptRet) ProtoMessage()

func (*SetOptRet) Reset

func (m *SetOptRet) Reset()

func (*SetOptRet) String

func (m *SetOptRet) String() string

Jump to

Keyboard shortcuts

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