schema

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Allocator_MakeAllocation_FullMethodName = "/schema.Allocator/MakeAllocation"
)

Variables

View Source
var Allocator_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "schema.Allocator",
	HandlerType: (*AllocatorServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "MakeAllocation",
			Handler:    _Allocator_MakeAllocation_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "allocator.proto",
}

Allocator_ServiceDesc is the grpc.ServiceDesc for Allocator service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_allocator_proto protoreflect.FileDescriptor

Functions

func RegisterAllocatorServer

func RegisterAllocatorServer(s grpc.ServiceRegistrar, srv AllocatorServer)

Types

type AllocatorClient

type AllocatorClient interface {
	// MakeAllocation makes an allocation.
	MakeAllocation(ctx context.Context, in *MakeAllocationRequest, opts ...grpc.CallOption) (*MakeAllocationResponse, error)
}

AllocatorClient is the client API for Allocator 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.

Allocator service is a test service that simply makes allocations during request processing.

func NewAllocatorClient

func NewAllocatorClient(cc grpc.ClientConnInterface) AllocatorClient

type AllocatorServer

type AllocatorServer interface {
	// MakeAllocation makes an allocation.
	MakeAllocation(context.Context, *MakeAllocationRequest) (*MakeAllocationResponse, error)
	// contains filtered or unexported methods
}

AllocatorServer is the server API for Allocator service. All implementations must embed UnimplementedAllocatorServer for forward compatibility.

Allocator service is a test service that simply makes allocations during request processing.

type MakeAllocationRequest

type MakeAllocationRequest struct {

	// size is the size of the allocation.
	Size uint64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
	// duration is the duration of the allocation.
	Duration *durationpb.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"`
	// contains filtered or unexported fields
}

MakeAllocationRequest is a request to make an allocation.

func (*MakeAllocationRequest) Descriptor deprecated

func (*MakeAllocationRequest) Descriptor() ([]byte, []int)

Deprecated: Use MakeAllocationRequest.ProtoReflect.Descriptor instead.

func (*MakeAllocationRequest) GetDuration

func (x *MakeAllocationRequest) GetDuration() *durationpb.Duration

func (*MakeAllocationRequest) GetSize

func (x *MakeAllocationRequest) GetSize() uint64

func (*MakeAllocationRequest) ProtoMessage

func (*MakeAllocationRequest) ProtoMessage()

func (*MakeAllocationRequest) ProtoReflect

func (x *MakeAllocationRequest) ProtoReflect() protoreflect.Message

func (*MakeAllocationRequest) Reset

func (x *MakeAllocationRequest) Reset()

func (*MakeAllocationRequest) String

func (x *MakeAllocationRequest) String() string

type MakeAllocationResponse

type MakeAllocationResponse struct {

	// value is a simple value.
	Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

MakeAllocationResponse is a response to a request to make an allocation.

func (*MakeAllocationResponse) Descriptor deprecated

func (*MakeAllocationResponse) Descriptor() ([]byte, []int)

Deprecated: Use MakeAllocationResponse.ProtoReflect.Descriptor instead.

func (*MakeAllocationResponse) GetValue

func (x *MakeAllocationResponse) GetValue() uint64

func (*MakeAllocationResponse) ProtoMessage

func (*MakeAllocationResponse) ProtoMessage()

func (*MakeAllocationResponse) ProtoReflect

func (x *MakeAllocationResponse) ProtoReflect() protoreflect.Message

func (*MakeAllocationResponse) Reset

func (x *MakeAllocationResponse) Reset()

func (*MakeAllocationResponse) String

func (x *MakeAllocationResponse) String() string

type UnimplementedAllocatorServer

type UnimplementedAllocatorServer struct{}

UnimplementedAllocatorServer 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 (UnimplementedAllocatorServer) MakeAllocation

type UnsafeAllocatorServer

type UnsafeAllocatorServer interface {
	// contains filtered or unexported methods
}

UnsafeAllocatorServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AllocatorServer will result in compilation errors.

Jump to

Keyboard shortcuts

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