Documentation ¶
Overview ¶
Package api is a generated protocol buffer package.
It is generated from these files:
github.com/micro/examples/api/rpc/proto/api.proto
It has these top-level messages:
CallRequest CallResponse EmptyRequest EmptyResponse
Package api is a generated protocol buffer package.
It is generated from these files:
github.com/micro/examples/api/rpc/proto/api.proto
It has these top-level messages:
CallRequest CallResponse EmptyRequest EmptyResponse
Index ¶
- func RegisterExampleHandler(s server.Server, hdlr ExampleHandler, opts ...server.HandlerOption)
- func RegisterFooHandler(s server.Server, hdlr FooHandler, opts ...server.HandlerOption)
- type CallRequest
- type CallResponse
- type EmptyRequest
- type EmptyResponse
- type Example
- type ExampleClient
- type ExampleHandler
- type Foo
- type FooClient
- type FooHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterExampleHandler ¶
func RegisterExampleHandler(s server.Server, hdlr ExampleHandler, opts ...server.HandlerOption)
func RegisterFooHandler ¶
func RegisterFooHandler(s server.Server, hdlr FooHandler, opts ...server.HandlerOption)
Types ¶
type CallRequest ¶
type CallRequest struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (*CallRequest) Descriptor ¶
func (*CallRequest) Descriptor() ([]byte, []int)
func (*CallRequest) GetName ¶
func (m *CallRequest) GetName() string
func (*CallRequest) ProtoMessage ¶
func (*CallRequest) ProtoMessage()
func (*CallRequest) Reset ¶
func (m *CallRequest) Reset()
func (*CallRequest) String ¶
func (m *CallRequest) String() string
type CallResponse ¶
type CallResponse struct {
Message string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"`
}
func (*CallResponse) Descriptor ¶
func (*CallResponse) Descriptor() ([]byte, []int)
func (*CallResponse) GetMessage ¶
func (m *CallResponse) GetMessage() string
func (*CallResponse) ProtoMessage ¶
func (*CallResponse) ProtoMessage()
func (*CallResponse) Reset ¶
func (m *CallResponse) Reset()
func (*CallResponse) String ¶
func (m *CallResponse) String() string
type EmptyRequest ¶
type EmptyRequest struct { }
func (*EmptyRequest) Descriptor ¶
func (*EmptyRequest) Descriptor() ([]byte, []int)
func (*EmptyRequest) ProtoMessage ¶
func (*EmptyRequest) ProtoMessage()
func (*EmptyRequest) Reset ¶
func (m *EmptyRequest) Reset()
func (*EmptyRequest) String ¶
func (m *EmptyRequest) String() string
type EmptyResponse ¶
type EmptyResponse struct { }
func (*EmptyResponse) Descriptor ¶
func (*EmptyResponse) Descriptor() ([]byte, []int)
func (*EmptyResponse) ProtoMessage ¶
func (*EmptyResponse) ProtoMessage()
func (*EmptyResponse) Reset ¶
func (m *EmptyResponse) Reset()
func (*EmptyResponse) String ¶
func (m *EmptyResponse) String() string
type Example ¶
type Example struct {
ExampleHandler
}
func (*Example) Call ¶
func (h *Example) Call(ctx context.Context, in *CallRequest, out *CallResponse) error
type ExampleClient ¶
type ExampleClient interface {
Call(ctx context.Context, in *CallRequest, opts ...client.CallOption) (*CallResponse, error)
}
func NewExampleClient ¶
func NewExampleClient(serviceName string, c client.Client) ExampleClient
type ExampleHandler ¶
type ExampleHandler interface {
Call(context.Context, *CallRequest, *CallResponse) error
}
type Foo ¶
type Foo struct {
FooHandler
}
func (*Foo) Bar ¶
func (h *Foo) Bar(ctx context.Context, in *EmptyRequest, out *EmptyResponse) error
type FooClient ¶
type FooClient interface {
Bar(ctx context.Context, in *EmptyRequest, opts ...client.CallOption) (*EmptyResponse, error)
}
type FooHandler ¶
type FooHandler interface {
Bar(context.Context, *EmptyRequest, *EmptyResponse) error
}
Click to show internal directories.
Click to hide internal directories.