Documentation
¶
Overview ¶
Package shakesapp defines a server which can be queried to determined many times a string appears in the works of Shakespeare, and a client which can be used to send load to that server.
Index ¶
- func RegisterShakespeareServiceServer(s *grpc.Server, srv ShakespeareServiceServer)
- func SimulateClient(ctx context.Context, addr string, numReqs, reqsInFlight int) error
- type ShakespeareRequest
- func (*ShakespeareRequest) Descriptor() ([]byte, []int)
- func (m *ShakespeareRequest) GetQuery() string
- func (*ShakespeareRequest) ProtoMessage()
- func (m *ShakespeareRequest) Reset()
- func (m *ShakespeareRequest) String() string
- func (m *ShakespeareRequest) XXX_DiscardUnknown()
- func (m *ShakespeareRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShakespeareRequest) XXX_Merge(src proto.Message)
- func (m *ShakespeareRequest) XXX_Size() int
- func (m *ShakespeareRequest) XXX_Unmarshal(b []byte) error
- type ShakespeareResponse
- func (*ShakespeareResponse) Descriptor() ([]byte, []int)
- func (m *ShakespeareResponse) GetMatchCount() int64
- func (*ShakespeareResponse) ProtoMessage()
- func (m *ShakespeareResponse) Reset()
- func (m *ShakespeareResponse) String() string
- func (m *ShakespeareResponse) XXX_DiscardUnknown()
- func (m *ShakespeareResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ShakespeareResponse) XXX_Merge(src proto.Message)
- func (m *ShakespeareResponse) XXX_Size() int
- func (m *ShakespeareResponse) XXX_Unmarshal(b []byte) error
- type ShakespeareServiceClient
- type ShakespeareServiceServer
- type UnimplementedShakespeareServiceServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterShakespeareServiceServer ¶
func RegisterShakespeareServiceServer(s *grpc.Server, srv ShakespeareServiceServer)
Types ¶
type ShakespeareRequest ¶
type ShakespeareRequest struct { // query is a substring query. Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ShakespeareRequest) Descriptor ¶
func (*ShakespeareRequest) Descriptor() ([]byte, []int)
func (*ShakespeareRequest) GetQuery ¶
func (m *ShakespeareRequest) GetQuery() string
func (*ShakespeareRequest) ProtoMessage ¶
func (*ShakespeareRequest) ProtoMessage()
func (*ShakespeareRequest) Reset ¶
func (m *ShakespeareRequest) Reset()
func (*ShakespeareRequest) String ¶
func (m *ShakespeareRequest) String() string
func (*ShakespeareRequest) XXX_DiscardUnknown ¶
func (m *ShakespeareRequest) XXX_DiscardUnknown()
func (*ShakespeareRequest) XXX_Marshal ¶
func (m *ShakespeareRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShakespeareRequest) XXX_Merge ¶
func (m *ShakespeareRequest) XXX_Merge(src proto.Message)
func (*ShakespeareRequest) XXX_Size ¶
func (m *ShakespeareRequest) XXX_Size() int
func (*ShakespeareRequest) XXX_Unmarshal ¶
func (m *ShakespeareRequest) XXX_Unmarshal(b []byte) error
type ShakespeareResponse ¶
type ShakespeareResponse struct { // match_count is the number of matching lines. MatchCount int64 `protobuf:"varint,1,opt,name=match_count,json=matchCount,proto3" json:"match_count,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ShakespeareResponse) Descriptor ¶
func (*ShakespeareResponse) Descriptor() ([]byte, []int)
func (*ShakespeareResponse) GetMatchCount ¶
func (m *ShakespeareResponse) GetMatchCount() int64
func (*ShakespeareResponse) ProtoMessage ¶
func (*ShakespeareResponse) ProtoMessage()
func (*ShakespeareResponse) Reset ¶
func (m *ShakespeareResponse) Reset()
func (*ShakespeareResponse) String ¶
func (m *ShakespeareResponse) String() string
func (*ShakespeareResponse) XXX_DiscardUnknown ¶
func (m *ShakespeareResponse) XXX_DiscardUnknown()
func (*ShakespeareResponse) XXX_Marshal ¶
func (m *ShakespeareResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ShakespeareResponse) XXX_Merge ¶
func (m *ShakespeareResponse) XXX_Merge(src proto.Message)
func (*ShakespeareResponse) XXX_Size ¶
func (m *ShakespeareResponse) XXX_Size() int
func (*ShakespeareResponse) XXX_Unmarshal ¶
func (m *ShakespeareResponse) XXX_Unmarshal(b []byte) error
type ShakespeareServiceClient ¶
type ShakespeareServiceClient interface { // Accepts a query string and returns the number of lines containing that. GetMatchCount(ctx context.Context, in *ShakespeareRequest, opts ...grpc.CallOption) (*ShakespeareResponse, error) }
ShakespeareServiceClient is the client API for ShakespeareService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewShakespeareServiceClient ¶
func NewShakespeareServiceClient(cc grpc.ClientConnInterface) ShakespeareServiceClient
type ShakespeareServiceServer ¶
type ShakespeareServiceServer interface { // Accepts a query string and returns the number of lines containing that. GetMatchCount(context.Context, *ShakespeareRequest) (*ShakespeareResponse, error) }
ShakespeareServiceServer is the server API for ShakespeareService service.
func NewServer ¶
func NewServer() ShakespeareServiceServer
NewServer returns an implementation of the server for ShakespeareService (defined in shakesapp.proto).
type UnimplementedShakespeareServiceServer ¶
type UnimplementedShakespeareServiceServer struct { }
UnimplementedShakespeareServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedShakespeareServiceServer) GetMatchCount ¶
func (*UnimplementedShakespeareServiceServer) GetMatchCount(ctx context.Context, req *ShakespeareRequest) (*ShakespeareResponse, error)