sleepymemory

package
v0.0.0-...-e0d20fb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_sleepymemory_sleepymemory_proto protoreflect.FileDescriptor

Functions

func RegisterSleeperServer

func RegisterSleeperServer(s *grpc.Server, 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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSleeperClient

func NewSleeperClient(cc grpc.ClientConnInterface) SleeperClient

type SleeperServer

type SleeperServer interface {
	Sleep(context.Context, *SleepRequest) (*SleepResponse, error)
}

SleeperServer is the server API for Sleeper service.

type UnimplementedSleeperServer

type UnimplementedSleeperServer struct {
}

UnimplementedSleeperServer can be embedded to have forward compatible implementations.

func (*UnimplementedSleeperServer) Sleep

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL