distcachepb

package
v0.0.0-...-a0625f0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2018 License: MIT Imports: 5 Imported by: 1

Documentation

Overview

Package distcachepb is a generated protocol buffer package.

It is generated from these files:

distcachepb/distcache.proto

It has these top-level messages:

Request
Response

Index

Constants

This section is empty.

Variables

View Source
var Status_name = map[int32]string{
	0: "Err",
	1: "Ok",
}
View Source
var Status_value = map[string]int32{
	"Err": 0,
	"Ok":  1,
}
View Source
var TrxnType_name = map[int32]string{
	0: "GET",
	1: "SET",
	2: "DELETE",
}
View Source
var TrxnType_value = map[string]int32{
	"GET":    0,
	"SET":    1,
	"DELETE": 2,
}

Functions

func RegisterCacheServer

func RegisterCacheServer(s *grpc.Server, srv CacheServer)

Types

type CacheClient

type CacheClient interface {
	Trxn(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

func NewCacheClient

func NewCacheClient(cc *grpc.ClientConn) CacheClient

type CacheServer

type CacheServer interface {
	Trxn(context.Context, *Request) (*Response, error)
}

type Request

type Request struct {
	Type  TrxnType `protobuf:"varint,1,opt,name=type,enum=distcachepb.TrxnType" json:"type,omitempty"`
	Key   string   `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
	Value string   `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"`
}

func (*Request) Descriptor

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

func (*Request) GetKey

func (m *Request) GetKey() string

func (*Request) GetType

func (m *Request) GetType() TrxnType

func (*Request) GetValue

func (m *Request) GetValue() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) Reset

func (m *Request) Reset()

func (*Request) String

func (m *Request) String() string

type Response

type Response struct {
	Status Status `protobuf:"varint,1,opt,name=status,enum=distcachepb.Status" json:"status,omitempty"`
	Server string `protobuf:"bytes,2,opt,name=server" json:"server,omitempty"`
	Key    string `protobuf:"bytes,3,opt,name=key" json:"key,omitempty"`
	Value  string `protobuf:"bytes,4,opt,name=value" json:"value,omitempty"`
}

func (*Response) Descriptor

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

func (*Response) GetKey

func (m *Response) GetKey() string

func (*Response) GetServer

func (m *Response) GetServer() string

func (*Response) GetStatus

func (m *Response) GetStatus() Status

func (*Response) GetValue

func (m *Response) GetValue() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

type Status

type Status int32
const (
	Status_Err Status = 0
	Status_Ok  Status = 1
)

func (Status) EnumDescriptor

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

func (Status) String

func (x Status) String() string

type TrxnType

type TrxnType int32
const (
	TrxnType_GET    TrxnType = 0
	TrxnType_SET    TrxnType = 1
	TrxnType_DELETE TrxnType = 2
)

func (TrxnType) EnumDescriptor

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

func (TrxnType) String

func (x TrxnType) String() string

Jump to

Keyboard shortcuts

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