Documentation ¶
Overview ¶
Package sleepymemory contains protobuf messages.
Index ¶
- Variables
- func RegisterSleeperServer(s grpc.ServiceRegistrar, srv SleeperServer)
- type SleepRequest
- func (*SleepRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SleepRequest) GetSleepDuration() *durationpb.Duration
- func (x *SleepRequest) GetWasteBytes() int64
- func (*SleepRequest) ProtoMessage()
- func (x *SleepRequest) ProtoReflect() protoreflect.Message
- func (x *SleepRequest) Reset()
- func (x *SleepRequest) String() string
- type SleepResponse
- type SleeperClient
- type SleeperServer
- type UnimplementedSleeperServer
- type UnsafeSleeperServer
Constants ¶
This section is empty.
Variables ¶
var File_sleepymemory_sleepymemory_proto protoreflect.FileDescriptor
var Sleeper_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sleepymemory.Sleeper", HandlerType: (*SleeperServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Sleep", Handler: _Sleeper_Sleep_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sleepymemory/sleepymemory.proto", }
Sleeper_ServiceDesc is the grpc.ServiceDesc for Sleeper service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSleeperServer ¶
func RegisterSleeperServer(s grpc.ServiceRegistrar, srv SleeperServer)
Types ¶
type SleepRequest ¶
type SleepRequest struct { // The duration the request will sleep. SleepDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=sleep_duration,json=sleepDuration,proto3" json:"sleep_duration,omitempty"` // Bytes of memory that will be allocated before sleeping to simulate requests that use lots of memory. WasteBytes int64 `protobuf:"varint,2,opt,name=waste_bytes,json=wasteBytes,proto3" json:"waste_bytes,omitempty"` // contains filtered or unexported fields }
func (*SleepRequest) Descriptor
deprecated
func (*SleepRequest) Descriptor() ([]byte, []int)
Deprecated: Use SleepRequest.ProtoReflect.Descriptor instead.
func (*SleepRequest) GetSleepDuration ¶
func (x *SleepRequest) GetSleepDuration() *durationpb.Duration
func (*SleepRequest) GetWasteBytes ¶
func (x *SleepRequest) GetWasteBytes() int64
func (*SleepRequest) ProtoMessage ¶
func (*SleepRequest) ProtoMessage()
func (*SleepRequest) ProtoReflect ¶
func (x *SleepRequest) ProtoReflect() protoreflect.Message
func (*SleepRequest) Reset ¶
func (x *SleepRequest) Reset()
func (*SleepRequest) String ¶
func (x *SleepRequest) String() string
type SleepResponse ¶
type SleepResponse struct { // The value is ignored but exists to prevent garbage collection freeing the waste slice early. Ignored int64 `protobuf:"varint,1,opt,name=ignored,proto3" json:"ignored,omitempty"` // contains filtered or unexported fields }
func (*SleepResponse) Descriptor
deprecated
func (*SleepResponse) Descriptor() ([]byte, []int)
Deprecated: Use SleepResponse.ProtoReflect.Descriptor instead.
func (*SleepResponse) GetIgnored ¶
func (x *SleepResponse) GetIgnored() int64
func (*SleepResponse) ProtoMessage ¶
func (*SleepResponse) ProtoMessage()
func (*SleepResponse) ProtoReflect ¶
func (x *SleepResponse) ProtoReflect() protoreflect.Message
func (*SleepResponse) Reset ¶
func (x *SleepResponse) Reset()
func (*SleepResponse) String ¶
func (x *SleepResponse) String() string
type SleeperClient ¶
type SleeperClient interface {
Sleep(ctx context.Context, in *SleepRequest, opts ...grpc.CallOption) (*SleepResponse, error)
}
SleeperClient is the client API for Sleeper 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 NewSleeperClient ¶
func NewSleeperClient(cc grpc.ClientConnInterface) SleeperClient
type SleeperServer ¶
type SleeperServer interface { Sleep(context.Context, *SleepRequest) (*SleepResponse, error) // contains filtered or unexported methods }
SleeperServer is the server API for Sleeper service. All implementations must embed UnimplementedSleeperServer for forward compatibility
type UnimplementedSleeperServer ¶
type UnimplementedSleeperServer struct { }
UnimplementedSleeperServer must be embedded to have forward compatible implementations.
func (UnimplementedSleeperServer) Sleep ¶
func (UnimplementedSleeperServer) Sleep(context.Context, *SleepRequest) (*SleepResponse, error)
type UnsafeSleeperServer ¶
type UnsafeSleeperServer interface {
// contains filtered or unexported methods
}
UnsafeSleeperServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SleeperServer will result in compilation errors.