schema

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

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(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

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