proto

package
v1.4.9 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MPL-2.0 Imports: 5 Imported by: 6 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package proto is a generated protocol buffer package.

It is generated from these files:

kv.proto

It has these top-level messages:

GetRequest
GetResponse
PutRequest
Empty
SumRequest
SumResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAddHelperServer

func RegisterAddHelperServer(s *grpc.Server, srv AddHelperServer)

func RegisterCounterServer

func RegisterCounterServer(s *grpc.Server, srv CounterServer)

Types

type AddHelperClient

type AddHelperClient interface {
	Sum(ctx context.Context, in *SumRequest, opts ...grpc.CallOption) (*SumResponse, error)
}

func NewAddHelperClient

func NewAddHelperClient(cc *grpc.ClientConn) AddHelperClient

type AddHelperServer

type AddHelperServer interface {
	Sum(context.Context, *SumRequest) (*SumResponse, error)
}

type CounterClient

type CounterClient interface {
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*Empty, error)
}

func NewCounterClient

func NewCounterClient(cc *grpc.ClientConn) CounterClient

type CounterServer

type CounterServer interface {
	Get(context.Context, *GetRequest) (*GetResponse, error)
	Put(context.Context, *PutRequest) (*Empty, error)
}

type Empty

type Empty struct {
}

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

type GetRequest

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

func (*GetRequest) Descriptor

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

func (*GetRequest) GetKey

func (m *GetRequest) GetKey() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) String

func (m *GetRequest) String() string

type GetResponse

type GetResponse struct {
	Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
}

func (*GetResponse) Descriptor

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

func (*GetResponse) GetValue

func (m *GetResponse) GetValue() int64

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset

func (m *GetResponse) Reset()

func (*GetResponse) String

func (m *GetResponse) String() string

type PutRequest

type PutRequest struct {
	AddServer uint32 `protobuf:"varint,1,opt,name=add_server,json=addServer" json:"add_server,omitempty"`
	Key       string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
	Value     int64  `protobuf:"varint,3,opt,name=value" json:"value,omitempty"`
}

func (*PutRequest) Descriptor

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

func (*PutRequest) GetAddServer

func (m *PutRequest) GetAddServer() uint32

func (*PutRequest) GetKey

func (m *PutRequest) GetKey() string

func (*PutRequest) GetValue

func (m *PutRequest) GetValue() int64

func (*PutRequest) ProtoMessage

func (*PutRequest) ProtoMessage()

func (*PutRequest) Reset

func (m *PutRequest) Reset()

func (*PutRequest) String

func (m *PutRequest) String() string

type SumRequest

type SumRequest struct {
	A int64 `protobuf:"varint,1,opt,name=a" json:"a,omitempty"`
	B int64 `protobuf:"varint,2,opt,name=b" json:"b,omitempty"`
}

func (*SumRequest) Descriptor

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

func (*SumRequest) GetA

func (m *SumRequest) GetA() int64

func (*SumRequest) GetB

func (m *SumRequest) GetB() int64

func (*SumRequest) ProtoMessage

func (*SumRequest) ProtoMessage()

func (*SumRequest) Reset

func (m *SumRequest) Reset()

func (*SumRequest) String

func (m *SumRequest) String() string

type SumResponse

type SumResponse struct {
	R int64 `protobuf:"varint,1,opt,name=r" json:"r,omitempty"`
}

func (*SumResponse) Descriptor

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

func (*SumResponse) GetR

func (m *SumResponse) GetR() int64

func (*SumResponse) ProtoMessage

func (*SumResponse) ProtoMessage()

func (*SumResponse) Reset

func (m *SumResponse) Reset()

func (*SumResponse) String

func (m *SumResponse) String() string

Jump to

Keyboard shortcuts

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