Documentation
¶
Index ¶
- Variables
- func RegisterExampleServer(s *grpc.Server, srv ExampleServer)
- type AddWordRequest
- type AddWordResponse
- type ExampleClient
- type ExampleServer
- type GetWordsRequest
- type GetWordsResponse
- func (*GetWordsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetWordsResponse) GetBestWords() []string
- func (x *GetWordsResponse) GetReadAtIndex() uint64
- func (*GetWordsResponse) ProtoMessage()
- func (x *GetWordsResponse) ProtoReflect() protoreflect.Message
- func (x *GetWordsResponse) Reset()
- func (x *GetWordsResponse) String() string
- type UnimplementedExampleServer
Constants ¶
This section is empty.
Variables ¶
View Source
var File_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExampleServer ¶
func RegisterExampleServer(s *grpc.Server, srv ExampleServer)
Types ¶
type AddWordRequest ¶
type AddWordRequest struct { Word string `protobuf:"bytes,1,opt,name=word,proto3" json:"word,omitempty"` // contains filtered or unexported fields }
func (*AddWordRequest) Descriptor
deprecated
func (*AddWordRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddWordRequest.ProtoReflect.Descriptor instead.
func (*AddWordRequest) GetWord ¶
func (x *AddWordRequest) GetWord() string
func (*AddWordRequest) ProtoMessage ¶
func (*AddWordRequest) ProtoMessage()
func (*AddWordRequest) ProtoReflect ¶
func (x *AddWordRequest) ProtoReflect() protoreflect.Message
func (*AddWordRequest) Reset ¶
func (x *AddWordRequest) Reset()
func (*AddWordRequest) String ¶
func (x *AddWordRequest) String() string
type AddWordResponse ¶
type AddWordResponse struct { CommitIndex uint64 `protobuf:"varint,1,opt,name=commit_index,json=commitIndex,proto3" json:"commit_index,omitempty"` // contains filtered or unexported fields }
func (*AddWordResponse) Descriptor
deprecated
func (*AddWordResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddWordResponse.ProtoReflect.Descriptor instead.
func (*AddWordResponse) GetCommitIndex ¶
func (x *AddWordResponse) GetCommitIndex() uint64
func (*AddWordResponse) ProtoMessage ¶
func (*AddWordResponse) ProtoMessage()
func (*AddWordResponse) ProtoReflect ¶
func (x *AddWordResponse) ProtoReflect() protoreflect.Message
func (*AddWordResponse) Reset ¶
func (x *AddWordResponse) Reset()
func (*AddWordResponse) String ¶
func (x *AddWordResponse) String() string
type ExampleClient ¶
type ExampleClient interface { AddWord(ctx context.Context, in *AddWordRequest, opts ...grpc.CallOption) (*AddWordResponse, error) GetWords(ctx context.Context, in *GetWordsRequest, opts ...grpc.CallOption) (*GetWordsResponse, error) }
ExampleClient is the client API for Example service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewExampleClient ¶
func NewExampleClient(cc grpc.ClientConnInterface) ExampleClient
type ExampleServer ¶
type ExampleServer interface { AddWord(context.Context, *AddWordRequest) (*AddWordResponse, error) GetWords(context.Context, *GetWordsRequest) (*GetWordsResponse, error) }
ExampleServer is the server API for Example service.
type GetWordsRequest ¶
type GetWordsRequest struct {
// contains filtered or unexported fields
}
func (*GetWordsRequest) Descriptor
deprecated
func (*GetWordsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetWordsRequest.ProtoReflect.Descriptor instead.
func (*GetWordsRequest) ProtoMessage ¶
func (*GetWordsRequest) ProtoMessage()
func (*GetWordsRequest) ProtoReflect ¶
func (x *GetWordsRequest) ProtoReflect() protoreflect.Message
func (*GetWordsRequest) Reset ¶
func (x *GetWordsRequest) Reset()
func (*GetWordsRequest) String ¶
func (x *GetWordsRequest) String() string
type GetWordsResponse ¶
type GetWordsResponse struct { ReadAtIndex uint64 `protobuf:"varint,1,opt,name=read_at_index,json=readAtIndex,proto3" json:"read_at_index,omitempty"` BestWords []string `protobuf:"bytes,2,rep,name=best_words,json=bestWords,proto3" json:"best_words,omitempty"` // contains filtered or unexported fields }
func (*GetWordsResponse) Descriptor
deprecated
func (*GetWordsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetWordsResponse.ProtoReflect.Descriptor instead.
func (*GetWordsResponse) GetBestWords ¶
func (x *GetWordsResponse) GetBestWords() []string
func (*GetWordsResponse) GetReadAtIndex ¶
func (x *GetWordsResponse) GetReadAtIndex() uint64
func (*GetWordsResponse) ProtoMessage ¶
func (*GetWordsResponse) ProtoMessage()
func (*GetWordsResponse) ProtoReflect ¶
func (x *GetWordsResponse) ProtoReflect() protoreflect.Message
func (*GetWordsResponse) Reset ¶
func (x *GetWordsResponse) Reset()
func (*GetWordsResponse) String ¶
func (x *GetWordsResponse) String() string
type UnimplementedExampleServer ¶
type UnimplementedExampleServer struct { }
UnimplementedExampleServer can be embedded to have forward compatible implementations.
func (*UnimplementedExampleServer) AddWord ¶
func (*UnimplementedExampleServer) AddWord(context.Context, *AddWordRequest) (*AddWordResponse, error)
func (*UnimplementedExampleServer) GetWords ¶
func (*UnimplementedExampleServer) GetWords(context.Context, *GetWordsRequest) (*GetWordsResponse, error)
Click to show internal directories.
Click to hide internal directories.