Documentation ¶
Index ¶
- Variables
- func NetListener(l manet.Listener) net.Listener
- func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
- type GreeterClient
- type GreeterServer
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)
- func (m *HelloRequest) GetName() string
- func (m *HelloRequest) Marshal() (dAtA []byte, err error)
- func (m *HelloRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *HelloRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HelloRequest) ProtoMessage()
- func (m *HelloRequest) Reset()
- func (m *HelloRequest) Size() (n int)
- func (m *HelloRequest) String() string
- func (m *HelloRequest) Unmarshal(dAtA []byte) error
- func (m *HelloRequest) XXX_DiscardUnknown()
- func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloRequest) XXX_Merge(src proto.Message)
- func (m *HelloRequest) XXX_Size() int
- func (m *HelloRequest) XXX_Unmarshal(b []byte) error
- type HelloResponse
- func (*HelloResponse) Descriptor() ([]byte, []int)
- func (m *HelloResponse) GetMessage() string
- func (m *HelloResponse) Marshal() (dAtA []byte, err error)
- func (m *HelloResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *HelloResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*HelloResponse) ProtoMessage()
- func (m *HelloResponse) Reset()
- func (m *HelloResponse) Size() (n int)
- func (m *HelloResponse) String() string
- func (m *HelloResponse) Unmarshal(dAtA []byte) error
- func (m *HelloResponse) XXX_DiscardUnknown()
- func (m *HelloResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *HelloResponse) XXX_Merge(src proto.Message)
- func (m *HelloResponse) XXX_Size() int
- func (m *HelloResponse) XXX_Unmarshal(b []byte) error
- type Mux
- type Params
- type UnimplementedGreeterServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func NetListener ¶
NetListener turns this Listener into a net.Listener.
- Connections returned from Accept implement multiaddr-net Conn.
- Calling WrapNetListener on the net.Listener returned by this function will return the original (underlying) multiaddr-net Listener.
func RegisterGreeterServer ¶
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
Types ¶
type GreeterClient ¶
type GreeterClient interface {
Hello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error)
}
GreeterClient is the client API for Greeter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGreeterClient ¶
func NewGreeterClient(cc *grpc.ClientConn) GreeterClient
type GreeterServer ¶
type GreeterServer interface {
Hello(context.Context, *HelloRequest) (*HelloResponse, error)
}
GreeterServer is the server API for Greeter service.
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Request message example
func (*HelloRequest) Descriptor ¶
func (*HelloRequest) Descriptor() ([]byte, []int)
func (*HelloRequest) GetName ¶
func (m *HelloRequest) GetName() string
func (*HelloRequest) Marshal ¶
func (m *HelloRequest) Marshal() (dAtA []byte, err error)
func (*HelloRequest) MarshalToSizedBuffer ¶
func (m *HelloRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) Reset ¶
func (m *HelloRequest) Reset()
func (*HelloRequest) Size ¶
func (m *HelloRequest) Size() (n int)
func (*HelloRequest) String ¶
func (m *HelloRequest) String() string
func (*HelloRequest) Unmarshal ¶
func (m *HelloRequest) Unmarshal(dAtA []byte) error
func (*HelloRequest) XXX_DiscardUnknown ¶
func (m *HelloRequest) XXX_DiscardUnknown()
func (*HelloRequest) XXX_Marshal ¶
func (m *HelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HelloRequest) XXX_Merge ¶
func (m *HelloRequest) XXX_Merge(src proto.Message)
func (*HelloRequest) XXX_Size ¶
func (m *HelloRequest) XXX_Size() int
func (*HelloRequest) XXX_Unmarshal ¶
func (m *HelloRequest) XXX_Unmarshal(b []byte) error
type HelloResponse ¶
type HelloResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*HelloResponse) Descriptor ¶
func (*HelloResponse) Descriptor() ([]byte, []int)
func (*HelloResponse) GetMessage ¶
func (m *HelloResponse) GetMessage() string
func (*HelloResponse) Marshal ¶
func (m *HelloResponse) Marshal() (dAtA []byte, err error)
func (*HelloResponse) MarshalToSizedBuffer ¶
func (m *HelloResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*HelloResponse) ProtoMessage ¶
func (*HelloResponse) ProtoMessage()
func (*HelloResponse) Reset ¶
func (m *HelloResponse) Reset()
func (*HelloResponse) Size ¶
func (m *HelloResponse) Size() (n int)
func (*HelloResponse) String ¶
func (m *HelloResponse) String() string
func (*HelloResponse) Unmarshal ¶
func (m *HelloResponse) Unmarshal(dAtA []byte) error
func (*HelloResponse) XXX_DiscardUnknown ¶
func (m *HelloResponse) XXX_DiscardUnknown()
func (*HelloResponse) XXX_Marshal ¶
func (m *HelloResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*HelloResponse) XXX_Merge ¶
func (m *HelloResponse) XXX_Merge(src proto.Message)
func (*HelloResponse) XXX_Size ¶
func (m *HelloResponse) XXX_Size() int
func (*HelloResponse) XXX_Unmarshal ¶
func (m *HelloResponse) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { Logger *zap.Logger API *fasthttp.Server Address multiaddr.Multiaddr ShutdownTTL time.Duration P2P *grpc.Server }
StoreParams groups the parameters of network connections muxer constructor.
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer can be embedded to have forward compatible implementations.
func (*UnimplementedGreeterServer) Hello ¶
func (*UnimplementedGreeterServer) Hello(ctx context.Context, req *HelloRequest) (*HelloResponse, error)
Click to show internal directories.
Click to hide internal directories.