devicemanager

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeviceManager_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "device_manager.DeviceManager",
	HandlerType: (*DeviceManagerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RegisterDevice",
			Handler:    _DeviceManager_RegisterDevice_Handler,
		},
		{
			MethodName: "GetAvailableDevices",
			Handler:    _DeviceManager_GetAvailableDevices_Handler,
		},
		{
			MethodName: "ReservePodQuota",
			Handler:    _DeviceManager_ReservePodQuota_Handler,
		},
		{
			MethodName: "GetToken",
			Handler:    _DeviceManager_GetToken_Handler,
		},
		{
			MethodName: "ReturnToken",
			Handler:    _DeviceManager_ReturnToken_Handler,
		},
		{
			MethodName: "AllocateMemory",
			Handler:    _DeviceManager_AllocateMemory_Handler,
		},
		{
			MethodName: "FreeMemory",
			Handler:    _DeviceManager_FreeMemory_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pkg/devicemanager/device-manager.proto",
}

DeviceManager_ServiceDesc is the grpc.ServiceDesc for DeviceManager 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_pkg_devicemanager_device_manager_proto protoreflect.FileDescriptor

Functions

func RegisterDeviceManagerServer

func RegisterDeviceManagerServer(s grpc.ServiceRegistrar, srv DeviceManagerServer)

Types

type AllocateMemoryReply

type AllocateMemoryReply struct {
	// contains filtered or unexported fields
}

func (*AllocateMemoryReply) Descriptor deprecated

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

Deprecated: Use AllocateMemoryReply.ProtoReflect.Descriptor instead.

func (*AllocateMemoryReply) ProtoMessage

func (*AllocateMemoryReply) ProtoMessage()

func (*AllocateMemoryReply) ProtoReflect

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

func (*AllocateMemoryReply) Reset

func (x *AllocateMemoryReply) Reset()

func (*AllocateMemoryReply) String

func (x *AllocateMemoryReply) String() string

type AllocateMemoryRequest

type AllocateMemoryRequest struct {
	DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	PodId    string `protobuf:"bytes,2,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
	MemoryB  uint64 `protobuf:"varint,3,opt,name=memory_b,json=memoryB,proto3" json:"memory_b,omitempty"`
	// contains filtered or unexported fields
}

func (*AllocateMemoryRequest) Descriptor deprecated

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

Deprecated: Use AllocateMemoryRequest.ProtoReflect.Descriptor instead.

func (*AllocateMemoryRequest) GetDeviceId

func (x *AllocateMemoryRequest) GetDeviceId() string

func (*AllocateMemoryRequest) GetMemoryB

func (x *AllocateMemoryRequest) GetMemoryB() uint64

func (*AllocateMemoryRequest) GetPodId

func (x *AllocateMemoryRequest) GetPodId() string

func (*AllocateMemoryRequest) ProtoMessage

func (*AllocateMemoryRequest) ProtoMessage()

func (*AllocateMemoryRequest) ProtoReflect

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

func (*AllocateMemoryRequest) Reset

func (x *AllocateMemoryRequest) Reset()

func (*AllocateMemoryRequest) String

func (x *AllocateMemoryRequest) String() string

type DeviceManagerClient

type DeviceManagerClient interface {
	RegisterDevice(ctx context.Context, in *RegisterDeviceRequest, opts ...grpc.CallOption) (*RegisterDeviceReply, error)
	GetAvailableDevices(ctx context.Context, in *GetAvailableDevicesRequest, opts ...grpc.CallOption) (*GetAvailableDevicesReply, error)
	ReservePodQuota(ctx context.Context, in *ReservePodQuotaRequest, opts ...grpc.CallOption) (*ReservePodQuotaReply, error)
	GetToken(ctx context.Context, in *GetTokenRequest, opts ...grpc.CallOption) (*GetTokenReply, error)
	ReturnToken(ctx context.Context, in *ReturnTokenRequest, opts ...grpc.CallOption) (*ReturnTokenReply, error)
	AllocateMemory(ctx context.Context, in *AllocateMemoryRequest, opts ...grpc.CallOption) (*AllocateMemoryReply, error)
	FreeMemory(ctx context.Context, in *FreeMemoryRequest, opts ...grpc.CallOption) (*FreeMemoryReply, error)
}

DeviceManagerClient is the client API for DeviceManager 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.

type DeviceManagerServer

DeviceManagerServer is the server API for DeviceManager service. All implementations must embed UnimplementedDeviceManagerServer for forward compatibility

type FreeDeviceResources

type FreeDeviceResources struct {
	DeviceId string  `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	Memory   float64 `protobuf:"fixed64,2,opt,name=memory,proto3" json:"memory,omitempty"`
	Requests float64 `protobuf:"fixed64,3,opt,name=requests,proto3" json:"requests,omitempty"`
	// contains filtered or unexported fields
}

func (*FreeDeviceResources) Descriptor deprecated

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

Deprecated: Use FreeDeviceResources.ProtoReflect.Descriptor instead.

func (*FreeDeviceResources) GetDeviceId

func (x *FreeDeviceResources) GetDeviceId() string

func (*FreeDeviceResources) GetMemory

func (x *FreeDeviceResources) GetMemory() float64

func (*FreeDeviceResources) GetRequests

func (x *FreeDeviceResources) GetRequests() float64

func (*FreeDeviceResources) ProtoMessage

func (*FreeDeviceResources) ProtoMessage()

func (*FreeDeviceResources) ProtoReflect

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

func (*FreeDeviceResources) Reset

func (x *FreeDeviceResources) Reset()

func (*FreeDeviceResources) String

func (x *FreeDeviceResources) String() string

type FreeMemoryReply

type FreeMemoryReply struct {
	// contains filtered or unexported fields
}

func (*FreeMemoryReply) Descriptor deprecated

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

Deprecated: Use FreeMemoryReply.ProtoReflect.Descriptor instead.

func (*FreeMemoryReply) ProtoMessage

func (*FreeMemoryReply) ProtoMessage()

func (*FreeMemoryReply) ProtoReflect

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

func (*FreeMemoryReply) Reset

func (x *FreeMemoryReply) Reset()

func (*FreeMemoryReply) String

func (x *FreeMemoryReply) String() string

type FreeMemoryRequest

type FreeMemoryRequest struct {
	DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	PodId    string `protobuf:"bytes,2,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
	MemoryB  uint64 `protobuf:"varint,3,opt,name=memory_b,json=memoryB,proto3" json:"memory_b,omitempty"`
	// contains filtered or unexported fields
}

func (*FreeMemoryRequest) Descriptor deprecated

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

Deprecated: Use FreeMemoryRequest.ProtoReflect.Descriptor instead.

func (*FreeMemoryRequest) GetDeviceId

func (x *FreeMemoryRequest) GetDeviceId() string

func (*FreeMemoryRequest) GetMemoryB

func (x *FreeMemoryRequest) GetMemoryB() uint64

func (*FreeMemoryRequest) GetPodId

func (x *FreeMemoryRequest) GetPodId() string

func (*FreeMemoryRequest) ProtoMessage

func (*FreeMemoryRequest) ProtoMessage()

func (*FreeMemoryRequest) ProtoReflect

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

func (*FreeMemoryRequest) Reset

func (x *FreeMemoryRequest) Reset()

func (*FreeMemoryRequest) String

func (x *FreeMemoryRequest) String() string

type GetAvailableDevicesReply

type GetAvailableDevicesReply struct {
	Free []*FreeDeviceResources `protobuf:"bytes,1,rep,name=free,proto3" json:"free,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAvailableDevicesReply) Descriptor deprecated

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

Deprecated: Use GetAvailableDevicesReply.ProtoReflect.Descriptor instead.

func (*GetAvailableDevicesReply) GetFree

func (*GetAvailableDevicesReply) ProtoMessage

func (*GetAvailableDevicesReply) ProtoMessage()

func (*GetAvailableDevicesReply) ProtoReflect

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

func (*GetAvailableDevicesReply) Reset

func (x *GetAvailableDevicesReply) Reset()

func (*GetAvailableDevicesReply) String

func (x *GetAvailableDevicesReply) String() string

type GetAvailableDevicesRequest

type GetAvailableDevicesRequest struct {
	Vendor string `protobuf:"bytes,1,opt,name=vendor,proto3" json:"vendor,omitempty"`
	Model  string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
	// contains filtered or unexported fields
}

func (*GetAvailableDevicesRequest) Descriptor deprecated

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

Deprecated: Use GetAvailableDevicesRequest.ProtoReflect.Descriptor instead.

func (*GetAvailableDevicesRequest) GetModel

func (x *GetAvailableDevicesRequest) GetModel() string

func (*GetAvailableDevicesRequest) GetVendor

func (x *GetAvailableDevicesRequest) GetVendor() string

func (*GetAvailableDevicesRequest) ProtoMessage

func (*GetAvailableDevicesRequest) ProtoMessage()

func (*GetAvailableDevicesRequest) ProtoReflect

func (*GetAvailableDevicesRequest) Reset

func (x *GetAvailableDevicesRequest) Reset()

func (*GetAvailableDevicesRequest) String

func (x *GetAvailableDevicesRequest) String() string

type GetTokenReply

type GetTokenReply struct {
	ExpiresAt int64 `protobuf:"varint,1,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTokenReply) Descriptor deprecated

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

Deprecated: Use GetTokenReply.ProtoReflect.Descriptor instead.

func (*GetTokenReply) GetExpiresAt

func (x *GetTokenReply) GetExpiresAt() int64

func (*GetTokenReply) ProtoMessage

func (*GetTokenReply) ProtoMessage()

func (*GetTokenReply) ProtoReflect

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

func (*GetTokenReply) Reset

func (x *GetTokenReply) Reset()

func (*GetTokenReply) String

func (x *GetTokenReply) String() string

type GetTokenRequest

type GetTokenRequest struct {
	DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	PodId    string `protobuf:"bytes,2,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetTokenRequest) Descriptor deprecated

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

Deprecated: Use GetTokenRequest.ProtoReflect.Descriptor instead.

func (*GetTokenRequest) GetDeviceId

func (x *GetTokenRequest) GetDeviceId() string

func (*GetTokenRequest) GetPodId

func (x *GetTokenRequest) GetPodId() string

func (*GetTokenRequest) ProtoMessage

func (*GetTokenRequest) ProtoMessage()

func (*GetTokenRequest) ProtoReflect

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

func (*GetTokenRequest) Reset

func (x *GetTokenRequest) Reset()

func (*GetTokenRequest) String

func (x *GetTokenRequest) String() string

type RegisterDeviceReply

type RegisterDeviceReply struct {
	// contains filtered or unexported fields
}

func (*RegisterDeviceReply) Descriptor deprecated

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

Deprecated: Use RegisterDeviceReply.ProtoReflect.Descriptor instead.

func (*RegisterDeviceReply) ProtoMessage

func (*RegisterDeviceReply) ProtoMessage()

func (*RegisterDeviceReply) ProtoReflect

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

func (*RegisterDeviceReply) Reset

func (x *RegisterDeviceReply) Reset()

func (*RegisterDeviceReply) String

func (x *RegisterDeviceReply) String() string

type RegisterDeviceRequest

type RegisterDeviceRequest struct {
	Vendor         string `protobuf:"bytes,1,opt,name=vendor,proto3" json:"vendor,omitempty"`
	Model          string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
	DeviceId       string `protobuf:"bytes,3,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	MemoryB        uint64 `protobuf:"varint,4,opt,name=memory_b,json=memoryB,proto3" json:"memory_b,omitempty"`
	AllocatorPodId string `protobuf:"bytes,5,opt,name=allocator_pod_id,json=allocatorPodId,proto3" json:"allocator_pod_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterDeviceRequest) Descriptor deprecated

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

Deprecated: Use RegisterDeviceRequest.ProtoReflect.Descriptor instead.

func (*RegisterDeviceRequest) GetAllocatorPodId

func (x *RegisterDeviceRequest) GetAllocatorPodId() string

func (*RegisterDeviceRequest) GetDeviceId

func (x *RegisterDeviceRequest) GetDeviceId() string

func (*RegisterDeviceRequest) GetMemoryB

func (x *RegisterDeviceRequest) GetMemoryB() uint64

func (*RegisterDeviceRequest) GetModel

func (x *RegisterDeviceRequest) GetModel() string

func (*RegisterDeviceRequest) GetVendor

func (x *RegisterDeviceRequest) GetVendor() string

func (*RegisterDeviceRequest) ProtoMessage

func (*RegisterDeviceRequest) ProtoMessage()

func (*RegisterDeviceRequest) ProtoReflect

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

func (*RegisterDeviceRequest) Reset

func (x *RegisterDeviceRequest) Reset()

func (*RegisterDeviceRequest) String

func (x *RegisterDeviceRequest) String() string

type ReservePodQuotaReply

type ReservePodQuotaReply struct {
	// contains filtered or unexported fields
}

func (*ReservePodQuotaReply) Descriptor deprecated

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

Deprecated: Use ReservePodQuotaReply.ProtoReflect.Descriptor instead.

func (*ReservePodQuotaReply) ProtoMessage

func (*ReservePodQuotaReply) ProtoMessage()

func (*ReservePodQuotaReply) ProtoReflect

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

func (*ReservePodQuotaReply) Reset

func (x *ReservePodQuotaReply) Reset()

func (*ReservePodQuotaReply) String

func (x *ReservePodQuotaReply) String() string

type ReservePodQuotaRequest

type ReservePodQuotaRequest struct {
	DeviceId string  `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	PodId    string  `protobuf:"bytes,2,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
	Requests float64 `protobuf:"fixed64,3,opt,name=requests,proto3" json:"requests,omitempty"`
	Limit    float64 `protobuf:"fixed64,4,opt,name=limit,proto3" json:"limit,omitempty"`
	Memory   float64 `protobuf:"fixed64,5,opt,name=memory,proto3" json:"memory,omitempty"`
	// contains filtered or unexported fields
}

func (*ReservePodQuotaRequest) Descriptor deprecated

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

Deprecated: Use ReservePodQuotaRequest.ProtoReflect.Descriptor instead.

func (*ReservePodQuotaRequest) GetDeviceId

func (x *ReservePodQuotaRequest) GetDeviceId() string

func (*ReservePodQuotaRequest) GetLimit

func (x *ReservePodQuotaRequest) GetLimit() float64

func (*ReservePodQuotaRequest) GetMemory

func (x *ReservePodQuotaRequest) GetMemory() float64

func (*ReservePodQuotaRequest) GetPodId

func (x *ReservePodQuotaRequest) GetPodId() string

func (*ReservePodQuotaRequest) GetRequests

func (x *ReservePodQuotaRequest) GetRequests() float64

func (*ReservePodQuotaRequest) ProtoMessage

func (*ReservePodQuotaRequest) ProtoMessage()

func (*ReservePodQuotaRequest) ProtoReflect

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

func (*ReservePodQuotaRequest) Reset

func (x *ReservePodQuotaRequest) Reset()

func (*ReservePodQuotaRequest) String

func (x *ReservePodQuotaRequest) String() string

type ReturnTokenReply

type ReturnTokenReply struct {
	// contains filtered or unexported fields
}

func (*ReturnTokenReply) Descriptor deprecated

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

Deprecated: Use ReturnTokenReply.ProtoReflect.Descriptor instead.

func (*ReturnTokenReply) ProtoMessage

func (*ReturnTokenReply) ProtoMessage()

func (*ReturnTokenReply) ProtoReflect

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

func (*ReturnTokenReply) Reset

func (x *ReturnTokenReply) Reset()

func (*ReturnTokenReply) String

func (x *ReturnTokenReply) String() string

type ReturnTokenRequest

type ReturnTokenRequest struct {
	DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"`
	PodId    string `protobuf:"bytes,2,opt,name=pod_id,json=podId,proto3" json:"pod_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ReturnTokenRequest) Descriptor deprecated

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

Deprecated: Use ReturnTokenRequest.ProtoReflect.Descriptor instead.

func (*ReturnTokenRequest) GetDeviceId

func (x *ReturnTokenRequest) GetDeviceId() string

func (*ReturnTokenRequest) GetPodId

func (x *ReturnTokenRequest) GetPodId() string

func (*ReturnTokenRequest) ProtoMessage

func (*ReturnTokenRequest) ProtoMessage()

func (*ReturnTokenRequest) ProtoReflect

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

func (*ReturnTokenRequest) Reset

func (x *ReturnTokenRequest) Reset()

func (*ReturnTokenRequest) String

func (x *ReturnTokenRequest) String() string

type UnimplementedDeviceManagerServer

type UnimplementedDeviceManagerServer struct {
}

UnimplementedDeviceManagerServer must be embedded to have forward compatible implementations.

func (UnimplementedDeviceManagerServer) AllocateMemory

func (UnimplementedDeviceManagerServer) FreeMemory

func (UnimplementedDeviceManagerServer) GetAvailableDevices

func (UnimplementedDeviceManagerServer) GetToken

func (UnimplementedDeviceManagerServer) RegisterDevice

func (UnimplementedDeviceManagerServer) ReservePodQuota

func (UnimplementedDeviceManagerServer) ReturnToken

type UnsafeDeviceManagerServer

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

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

Jump to

Keyboard shortcuts

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