Documentation ¶
Index ¶
- Variables
- func RegisterAllocatorServer(s grpc.ServiceRegistrar, srv AllocatorServer)
- type AllocatorClient
- type AllocatorServer
- type MakeAllocationRequest
- func (*MakeAllocationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MakeAllocationRequest) GetDuration() *durationpb.Duration
- func (x *MakeAllocationRequest) GetSize() uint64
- func (*MakeAllocationRequest) ProtoMessage()
- func (x *MakeAllocationRequest) ProtoReflect() protoreflect.Message
- func (x *MakeAllocationRequest) Reset()
- func (x *MakeAllocationRequest) String() string
- type MakeAllocationResponse
- func (*MakeAllocationResponse) Descriptor() ([]byte, []int)deprecated
- func (x *MakeAllocationResponse) GetValue() uint64
- func (*MakeAllocationResponse) ProtoMessage()
- func (x *MakeAllocationResponse) ProtoReflect() protoreflect.Message
- func (x *MakeAllocationResponse) Reset()
- func (x *MakeAllocationResponse) String() string
- type UnimplementedAllocatorServer
- type UnsafeAllocatorServer
Constants ¶
This section is empty.
Variables ¶
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).
var File_allocator_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAllocatorServer ¶
func RegisterAllocatorServer(s grpc.ServiceRegistrar, srv AllocatorServer)
Types ¶
type AllocatorClient ¶
type AllocatorClient interface {
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.
func NewAllocatorClient ¶
func NewAllocatorClient(cc grpc.ClientConnInterface) AllocatorClient
type AllocatorServer ¶
type AllocatorServer interface { 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.
type MakeAllocationRequest ¶
type MakeAllocationRequest struct { // size - размер аллокации Size uint64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` // duration - продолжительность времени, на которое надо заблокировать запрос после аллокации Duration *durationpb.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"` // contains filtered or unexported fields }
MakeAllocationRequest - запрос на аллокацию.
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 - просто некоторое значение Value uint64 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
MakeAllocationResponse - ответ на запрос на аллокацию.
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.
func (UnimplementedAllocatorServer) MakeAllocation ¶
func (UnimplementedAllocatorServer) MakeAllocation(context.Context, *MakeAllocationRequest) (*MakeAllocationResponse, error)
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.