Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
- type DeadlineRequest
- func (*DeadlineRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeadlineRequest) GetTimeout() int32
- func (x *DeadlineRequest) GetTodo() int32
- func (*DeadlineRequest) ProtoMessage()
- func (x *DeadlineRequest) ProtoReflect() protoreflect.Message
- func (x *DeadlineRequest) Reset()
- func (x *DeadlineRequest) String() string
- type DeadlineResponse
- type ExampleServiceClient
- type ExampleServiceServer
- type UnimplementedExampleServiceServer
- type UnsafeExampleServiceServer
Constants ¶
const (
ExampleService_Deadline_FullMethodName = "/netcontext.ExampleService/Deadline"
)
Variables ¶
var ExampleService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "netcontext.ExampleService", HandlerType: (*ExampleServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Deadline", Handler: _ExampleService_Deadline_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "netcontext/netcontext.proto", }
ExampleService_ServiceDesc is the grpc.ServiceDesc for ExampleService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_netcontext_netcontext_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExampleServiceServer ¶
func RegisterExampleServiceServer(s grpc.ServiceRegistrar, srv ExampleServiceServer)
Types ¶
type DeadlineRequest ¶
type DeadlineRequest struct { // Number of hops to attempt. Todo int32 `protobuf:"varint,1,opt,name=todo,proto3" json:"todo,omitempty"` // Timeout in seconds. Timeout int32 `protobuf:"varint,2,opt,name=timeout,proto3" json:"timeout,omitempty"` // contains filtered or unexported fields }
func (*DeadlineRequest) Descriptor
deprecated
func (*DeadlineRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeadlineRequest.ProtoReflect.Descriptor instead.
func (*DeadlineRequest) GetTimeout ¶
func (x *DeadlineRequest) GetTimeout() int32
func (*DeadlineRequest) GetTodo ¶
func (x *DeadlineRequest) GetTodo() int32
func (*DeadlineRequest) ProtoMessage ¶
func (*DeadlineRequest) ProtoMessage()
func (*DeadlineRequest) ProtoReflect ¶
func (x *DeadlineRequest) ProtoReflect() protoreflect.Message
func (*DeadlineRequest) Reset ¶
func (x *DeadlineRequest) Reset()
func (*DeadlineRequest) String ¶
func (x *DeadlineRequest) String() string
type DeadlineResponse ¶
type DeadlineResponse struct { // Number of hops achieved. Hops int32 `protobuf:"varint,1,opt,name=hops,proto3" json:"hops,omitempty"` // contains filtered or unexported fields }
func (*DeadlineResponse) Descriptor
deprecated
func (*DeadlineResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeadlineResponse.ProtoReflect.Descriptor instead.
func (*DeadlineResponse) GetHops ¶
func (x *DeadlineResponse) GetHops() int32
func (*DeadlineResponse) ProtoMessage ¶
func (*DeadlineResponse) ProtoMessage()
func (*DeadlineResponse) ProtoReflect ¶
func (x *DeadlineResponse) ProtoReflect() protoreflect.Message
func (*DeadlineResponse) Reset ¶
func (x *DeadlineResponse) Reset()
func (*DeadlineResponse) String ¶
func (x *DeadlineResponse) String() string
type ExampleServiceClient ¶
type ExampleServiceClient interface {
Deadline(ctx context.Context, in *DeadlineRequest, opts ...grpc.CallOption) (*DeadlineResponse, error)
}
ExampleServiceClient is the client API for ExampleService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewExampleServiceClient ¶
func NewExampleServiceClient(cc grpc.ClientConnInterface) ExampleServiceClient
type ExampleServiceServer ¶
type ExampleServiceServer interface { Deadline(context.Context, *DeadlineRequest) (*DeadlineResponse, error) // contains filtered or unexported methods }
ExampleServiceServer is the server API for ExampleService service. All implementations must embed UnimplementedExampleServiceServer for forward compatibility.
type UnimplementedExampleServiceServer ¶
type UnimplementedExampleServiceServer struct{}
UnimplementedExampleServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedExampleServiceServer) Deadline ¶
func (UnimplementedExampleServiceServer) Deadline(context.Context, *DeadlineRequest) (*DeadlineResponse, error)
type UnsafeExampleServiceServer ¶
type UnsafeExampleServiceServer interface {
// contains filtered or unexported methods
}
UnsafeExampleServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExampleServiceServer will result in compilation errors.