Documentation ¶
Index ¶
- Variables
- func RegisterEchoServer(s *grpc.Server, srv EchoServer)
- type EchoClient
- type EchoRequest
- func (*EchoRequest) Descriptor() ([]byte, []int)
- func (m *EchoRequest) GetIn() string
- func (m *EchoRequest) Marshal() (dAtA []byte, err error)
- func (m *EchoRequest) MarshalTo(dAtA []byte) (int, error)
- func (*EchoRequest) ProtoMessage()
- func (m *EchoRequest) Reset()
- func (m *EchoRequest) Size() (n int)
- func (m *EchoRequest) String() string
- func (m *EchoRequest) Unmarshal(dAtA []byte) error
- func (m *EchoRequest) XXX_DiscardUnknown()
- func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EchoRequest) XXX_Merge(src proto.Message)
- func (m *EchoRequest) XXX_Size() int
- func (m *EchoRequest) XXX_Unmarshal(b []byte) error
- type EchoResponse
- func (*EchoResponse) Descriptor() ([]byte, []int)
- func (m *EchoResponse) GetOut() string
- func (m *EchoResponse) Marshal() (dAtA []byte, err error)
- func (m *EchoResponse) MarshalTo(dAtA []byte) (int, error)
- func (*EchoResponse) ProtoMessage()
- func (m *EchoResponse) Reset()
- func (m *EchoResponse) Size() (n int)
- func (m *EchoResponse) String() string
- func (m *EchoResponse) Unmarshal(dAtA []byte) error
- func (m *EchoResponse) XXX_DiscardUnknown()
- func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EchoResponse) XXX_Merge(src proto.Message)
- func (m *EchoResponse) XXX_Size() int
- func (m *EchoResponse) XXX_Unmarshal(b []byte) error
- type EchoServer
- type LouderRequest
- func (*LouderRequest) Descriptor() ([]byte, []int)
- func (m *LouderRequest) GetIn() string
- func (m *LouderRequest) GetLoudness() int32
- func (m *LouderRequest) Marshal() (dAtA []byte, err error)
- func (m *LouderRequest) MarshalTo(dAtA []byte) (int, error)
- func (*LouderRequest) ProtoMessage()
- func (m *LouderRequest) Reset()
- func (m *LouderRequest) Size() (n int)
- func (m *LouderRequest) String() string
- func (m *LouderRequest) Unmarshal(dAtA []byte) error
- func (m *LouderRequest) XXX_DiscardUnknown()
- func (m *LouderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LouderRequest) XXX_Merge(src proto.Message)
- func (m *LouderRequest) XXX_Size() int
- func (m *LouderRequest) XXX_Unmarshal(b []byte) error
- type UnimplementedEchoServer
- func (*UnimplementedEchoServer) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error)
- func (*UnimplementedEchoServer) Louder(ctx context.Context, req *LouderRequest) (*EchoResponse, error)
- func (*UnimplementedEchoServer) LouderGet(ctx context.Context, req *LouderRequest) (*EchoResponse, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthEcho = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEcho = fmt.Errorf("proto: integer overflow") )
Functions ¶
func RegisterEchoServer ¶
func RegisterEchoServer(s *grpc.Server, srv EchoServer)
Types ¶
type EchoClient ¶
type EchoClient interface { // Echo "echos" the incoming string Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) // Louder "echos" the incoming string with `Loudness` additional exclamation marks Louder(ctx context.Context, in *LouderRequest, opts ...grpc.CallOption) (*EchoResponse, error) // LouderGet is the same as Louder, but pulls fields other than Loudness (i.e. In) from query params instead of POST LouderGet(ctx context.Context, in *LouderRequest, opts ...grpc.CallOption) (*EchoResponse, error) }
EchoClient is the client API for Echo service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewEchoClient ¶
func NewEchoClient(cc *grpc.ClientConn) EchoClient
type EchoRequest ¶
type EchoRequest struct {
In string `protobuf:"bytes,1,opt,name=In,proto3" json:"In,omitempty"`
}
func (*EchoRequest) Descriptor ¶
func (*EchoRequest) Descriptor() ([]byte, []int)
func (*EchoRequest) GetIn ¶
func (m *EchoRequest) GetIn() string
func (*EchoRequest) Marshal ¶
func (m *EchoRequest) Marshal() (dAtA []byte, err error)
func (*EchoRequest) ProtoMessage ¶
func (*EchoRequest) ProtoMessage()
func (*EchoRequest) Reset ¶
func (m *EchoRequest) Reset()
func (*EchoRequest) Size ¶
func (m *EchoRequest) Size() (n int)
func (*EchoRequest) String ¶
func (m *EchoRequest) String() string
func (*EchoRequest) Unmarshal ¶
func (m *EchoRequest) Unmarshal(dAtA []byte) error
func (*EchoRequest) XXX_DiscardUnknown ¶
func (m *EchoRequest) XXX_DiscardUnknown()
func (*EchoRequest) XXX_Marshal ¶
func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EchoRequest) XXX_Merge ¶
func (m *EchoRequest) XXX_Merge(src proto.Message)
func (*EchoRequest) XXX_Size ¶
func (m *EchoRequest) XXX_Size() int
func (*EchoRequest) XXX_Unmarshal ¶
func (m *EchoRequest) XXX_Unmarshal(b []byte) error
type EchoResponse ¶
type EchoResponse struct {
Out string `protobuf:"bytes,1,opt,name=Out,proto3" json:"Out,omitempty"`
}
func (*EchoResponse) Descriptor ¶
func (*EchoResponse) Descriptor() ([]byte, []int)
func (*EchoResponse) GetOut ¶
func (m *EchoResponse) GetOut() string
func (*EchoResponse) Marshal ¶
func (m *EchoResponse) Marshal() (dAtA []byte, err error)
func (*EchoResponse) ProtoMessage ¶
func (*EchoResponse) ProtoMessage()
func (*EchoResponse) Reset ¶
func (m *EchoResponse) Reset()
func (*EchoResponse) Size ¶
func (m *EchoResponse) Size() (n int)
func (*EchoResponse) String ¶
func (m *EchoResponse) String() string
func (*EchoResponse) Unmarshal ¶
func (m *EchoResponse) Unmarshal(dAtA []byte) error
func (*EchoResponse) XXX_DiscardUnknown ¶
func (m *EchoResponse) XXX_DiscardUnknown()
func (*EchoResponse) XXX_Marshal ¶
func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EchoResponse) XXX_Merge ¶
func (m *EchoResponse) XXX_Merge(src proto.Message)
func (*EchoResponse) XXX_Size ¶
func (m *EchoResponse) XXX_Size() int
func (*EchoResponse) XXX_Unmarshal ¶
func (m *EchoResponse) XXX_Unmarshal(b []byte) error
type EchoServer ¶
type EchoServer interface { // Echo "echos" the incoming string Echo(context.Context, *EchoRequest) (*EchoResponse, error) // Louder "echos" the incoming string with `Loudness` additional exclamation marks Louder(context.Context, *LouderRequest) (*EchoResponse, error) // LouderGet is the same as Louder, but pulls fields other than Loudness (i.e. In) from query params instead of POST LouderGet(context.Context, *LouderRequest) (*EchoResponse, error) }
EchoServer is the server API for Echo service.
type LouderRequest ¶
type LouderRequest struct { // In is the string to echo back In string `protobuf:"bytes,1,opt,name=In,proto3" json:"In,omitempty"` // Loudness is the number of exclamations marks to add to the echoed string Loudness int32 `protobuf:"varint,2,opt,name=Loudness,proto3" json:"Loudness,omitempty"` }
func (*LouderRequest) Descriptor ¶
func (*LouderRequest) Descriptor() ([]byte, []int)
func (*LouderRequest) GetIn ¶
func (m *LouderRequest) GetIn() string
func (*LouderRequest) GetLoudness ¶
func (m *LouderRequest) GetLoudness() int32
func (*LouderRequest) Marshal ¶
func (m *LouderRequest) Marshal() (dAtA []byte, err error)
func (*LouderRequest) ProtoMessage ¶
func (*LouderRequest) ProtoMessage()
func (*LouderRequest) Reset ¶
func (m *LouderRequest) Reset()
func (*LouderRequest) Size ¶
func (m *LouderRequest) Size() (n int)
func (*LouderRequest) String ¶
func (m *LouderRequest) String() string
func (*LouderRequest) Unmarshal ¶
func (m *LouderRequest) Unmarshal(dAtA []byte) error
func (*LouderRequest) XXX_DiscardUnknown ¶
func (m *LouderRequest) XXX_DiscardUnknown()
func (*LouderRequest) XXX_Marshal ¶
func (m *LouderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LouderRequest) XXX_Merge ¶
func (m *LouderRequest) XXX_Merge(src proto.Message)
func (*LouderRequest) XXX_Size ¶
func (m *LouderRequest) XXX_Size() int
func (*LouderRequest) XXX_Unmarshal ¶
func (m *LouderRequest) XXX_Unmarshal(b []byte) error
type UnimplementedEchoServer ¶
type UnimplementedEchoServer struct { }
UnimplementedEchoServer can be embedded to have forward compatible implementations.
func (*UnimplementedEchoServer) Echo ¶
func (*UnimplementedEchoServer) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error)
func (*UnimplementedEchoServer) Louder ¶
func (*UnimplementedEchoServer) Louder(ctx context.Context, req *LouderRequest) (*EchoResponse, error)
func (*UnimplementedEchoServer) LouderGet ¶
func (*UnimplementedEchoServer) LouderGet(ctx context.Context, req *LouderRequest) (*EchoResponse, error)
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
client/grpc
Package grpc provides a gRPC client for the Echo service.
|
Package grpc provides a gRPC client for the Echo service. |
client/http
Package http provides an HTTP client for the Echo service.
|
Package http provides an HTTP client for the Echo service. |
Click to show internal directories.
Click to hide internal directories.