manager

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

README

Manager

Manager service provides a barebones gRPC API and Service interface implementation for the development of the manager service.

Configuration

The service is configured using the environment variables from the following table. Note that any unset variables will be replaced with their default values.

Variable Description Default
COCOS_JAEGER_URL The URL for the Jaeger tracing endpoint. http://localhost:4318
COCOS_JAEGER_TRACE_RATIO The ratio of traces to sample. 1.0
MANAGER_INSTANCE_ID The instance ID for the manager service.
MANAGER_ATTESTATION_POLICY_BINARY The file path for the attestation policy binary. ../../build
MANAGER_GRPC_CLIENT_CERT The file path for the client certificate.
MANAGER_GRPC_CLIENT_KEY The file path for the client private key.
MANAGER_GRPC_SERVER_CA_CERTS The file path for the server CA certificate(s).
MANAGER_GRPC_URL The URL for the gRPC endpoint. localhost:7001
MANAGER_GRPC_TIMEOUT The timeout for gRPC requests. 60s
MANAGER_EOS_VERSION The EOS version used for booting SVMs.
MANAGER_INSTANCE_ID Manager service instance ID
MANAGER_QEMU_MEMORY_SIZE The total memory size for the virtual machine. Can be specified in a human-readable format like "2048M" or "4G". 2048M
MANAGER_QEMU_MEMORY_SLOTS The number of memory slots for the virtual machine. 5
MANAGER_QEMU_MAX_MEMORY The maximum memory size for the virtual machine. Can be specified in a human-readable format like "30G". 30G
MANAGER_QEMU_OVMF_CODE_IF The interface type for the OVMF code. pflash
MANAGER_QEMU_OVMF_CODE_FORMAT The format of the OVMF code file. raw
MANAGER_QEMU_OVMF_CODE_UNIT The unit number for the OVMF code. 0
MANAGER_QEMU_OVMF_CODE_FILE The file path for the OVMF code. /usr/share/OVMF/OVMF_CODE.fd
MANAGER_QEMU_OVMF_VERSION The version number of EDKII from which OVMF was built edk2-stable202408
MANAGER_QEMU_OVMF_CODE_READONLY Whether the OVMF code should be read-only. on
MANAGER_QEMU_OVMF_VARS_IF The interface type for the OVMF variables. pflash
MANAGER_QEMU_OVMF_VARS_FORMAT The format of the OVMF variables file. raw
MANAGER_QEMU_OVMF_VARS_UNIT The unit number for the OVMF variables. 1
MANAGER_QEMU_OVMF_VARS_FILE The file path for the OVMF variables. /usr/share/OVMF/OVMF_VARS.fd
MANAGER_QEMU_NETDEV_ID The ID for the network device. vmnic
MANAGER_QEMU_HOST_FWD_AGENT The port number for the host forward agent. 7020
MANAGER_QEMU_GUEST_FWD_AGENT The port number for the guest forward agent. 7002
MANAGER_QEMU_VIRTIO_NET_PCI_DISABLE_LEGACY Whether to disable the legacy PCI device. on
MANAGER_QEMU_VIRTIO_NET_PCI_IOMMU_PLATFORM Whether to enable the IOMMU platform for the virtio-net PCI device. true
MANAGER_QEMU_VIRTIO_NET_PCI_ADDR The PCI address for the virtio-net PCI device. 0x2
MANAGER_QEMU_VIRTIO_NET_PCI_ROMFILE The file path for the ROM image for the virtio-net PCI device.
MANAGER_QEMU_DISK_IMG_KERNEL_FILE The file path for the kernel image. img/bzImage
MANAGER_QEMU_DISK_IMG_ROOTFS_FILE The file path for the root filesystem image. img/rootfs.cpio.gz
MANAGER_QEMU_SEV_ID The ID for the Secure Encrypted Virtualization (SEV) device. sev0
MANAGER_QEMU_SEV_CBITPOS The position of the C-bit in the physical address. 51
MANAGER_QEMU_SEV_REDUCED_PHYS_BITS The number of reduced physical address bits for SEV. 1
MANAGER_QEMU_HOST_DATA Additional data for the SEV host.
MANAGER_QEMU_VSOCK_ID The ID for the virtual socket device. vhost-vsock-pci0
MANAGER_QEMU_VSOCK_GUEST_CID The guest-side CID (Context ID) for the virtual socket device. 3
MANAGER_QEMU_VSOCK_VNC Whether to enable the virtual socket device for VNC. 0
MANAGER_QEMU_BIN_PATH The file path for the QEMU binary. qemu-system-x86_64
MANAGER_QEMU_USE_SUDO Whether to use sudo to run QEMU. false
MANAGER_QEMU_ENABLE_SEV Whether to enable Secure Encrypted Virtualization (SEV). false
MANAGER_QEMU_ENABLE_SEV_SNP Whether to enable Secure Nested Paging (SEV-SNP). true
MANAGER_QEMU_ENABLE_KVM Whether to enable the Kernel-based Virtual Machine (KVM) acceleration. true
MANAGER_QEMU_MACHINE The machine type for QEMU. q35
MANAGER_QEMU_CPU The CPU model for QEMU. EPYC
MANAGER_QEMU_SMP_COUNT The number of virtual CPUs. 4
MANAGER_QEMU_SMP_MAXCPUS The maximum number of virtual CPUs. 64
MANAGER_QEMU_MEM_ID The ID for the memory device. ram1
MANAGER_QEMU_KERNEL_HASH Whether to enable kernel hash verification. false
MANAGER_QEMU_NO_GRAPHIC Whether to disable the graphical display. true
MANAGER_QEMU_MONITOR The type of monitor to use. pty
MANAGER_QEMU_HOST_FWD_RANGE The range of host ports to forward. 6100-6200

Setup

git clone https://github.com/ultravioletrs/cocos
cd cocos

NB: all relative paths in this document are relative to cocos repository directory.

QEMU-KVM

QEMU-KVM is a virtualization platform that allows you to run multiple operating systems on the same physical machine. It is a combination of two technologies: QEMU and KVM.

  • QEMU is an emulator that can run a variety of operating systems, including Linux, Windows, and macOS.
  • KVM is a Linux kernel module that allows QEMU to run virtual machines.

To install QEMU-KVM on a Debian based machine, run

sudo apt update
sudo apt install qemu-kvm

Create img directory in cmd/manager.

Add Vsock

The necessary kernel modules must be loaded on the hypervisor. To check if vhost_vsock is loaded run:

lsmod | grep vhost_vsock

If vhost_vsock is not loaded run the following commands:

sudo modprobe vhost_vsock
ls -l /dev/vhost-vsock
# crw-rw-rw- 1 root kvm 10, 241 Jan 16 12:05 /dev/vhost-vsock
ls -l /dev/vsock
# crw-rw-rw- 1 root root 10, 121 Jan 16 12:05 /dev/vsock
Prepare Cocos HAL

Cocos HAL for Linux is framework for building custom in-enclave Linux distribution. Use the instructions in Readme. Once the image is built copy the kernel and rootfs image to cmd/manager/img from buildroot/output/images/bzImage and buildroot/output/images/rootfs.cpio.gz respectively.

Another option is to use release versions of EOS that can be downloaded from the Cocos GitHub repository.

Test VM creation
cd cmd/manager

sudo find / -name OVMF_CODE.fd
# => /usr/share/OVMF/OVMF_CODE.fd
OVMF_CODE=/usr/share/OVMF/OVMF_CODE.fd

sudo find / -name OVMF_VARS.fd
# => /usr/share/OVMF/OVMF_VARS.fd
OVMF_VARS=/usr/share/OVMF/OVMF_VARS.fd

KERNEL="img/bzImage"
INITRD="img/rootfs.cpio.gz"

qemu-system-x86_64 \
    -enable-kvm \
    -cpu EPYC-v4 \
    -machine q35 \
    -smp 4 \
    -m 2048M,slots=5,maxmem=10240M \
    -no-reboot \
    -drive if=pflash,format=raw,unit=0,file=$OVMF_CODE,readonly=on \
    -netdev user,id=vmnic,hostfwd=tcp::7020-:7002 \
    -device virtio-net-pci,disable-legacy=on,iommu_platform=true,netdev=vmnic,romfile= \
    -device vhost-vsock-pci,id=vhost-vsock-pci0,guest-cid=3 -vnc :0 \
    -kernel $KERNEL \
    -append "earlyprintk=serial console=ttyS0" \
    -initrd $INITRD \
    -nographic \
    -monitor pty \
    -monitor unix:monitor,server,nowait

Once the VM is booted press enter and on the login use username root.

Build and run Agent

Agent is started automatically in the VM.

# List running processes and use 'grep' to filter for processes containing 'agent' in their names.
ps aux | grep cocos-agent
# This command helps verify that the 'agent' process is running.
# The output shows the process ID (PID), resource usage, and other information about the 'cocos-agent' process.
# For example: 118 root     cocos-agent

We can also check if Agent is reachable from the host machine:

# Use netcat (nc) to test the connection to localhost on port 7020.
nc -zv localhost 7020
# Output:
# nc: connect to localhost (::1) port 7020 (tcp) failed: Connection refused
# Connection to localhost (127.0.0.1) 7020 port [tcp/*] succeeded!
Conclusion

Now you are able to use Manager with Agent. Namely, Manager will create a VM with a separate OVMF variables file on manager /run request.

OVMF

We need Open Virtual Machine Firmware. OVMF is a port of Intel's tianocore firmware - an open source implementation of the Unified Extensible Firmware Interface (UEFI) - used by a qemu virtual machine. We need OVMF in order to run virtual machine with focal-server-cloudimg-amd64. When we install QEMU, we get two files that we need to start a VM: OVMF_VARS.fd and OVMF_CODE.fd. We will make a local copy of OVMF_VARS.fd since a VM will modify this file. On the other hand, OVMF_CODE.fd is only used as a reference, so we only record its path in an environment variable.

sudo find / -name OVMF_CODE.fd
# => /usr/share/OVMF/OVMF_CODE.fd
MANAGER_QEMU_OVMF_CODE_FILE=/usr/share/OVMF/OVMF_CODE.fd

sudo find / -name OVMF_VARS.fd
# => /usr/share/OVMF/OVMF_VARS.fd
MANAGER_QEMU_OVMF_VARS_FILE=/usr/share/OVMF/OVMF_VARS.fd

NB: we set environment variables that we will use in the shell process where we run manager.

Deployment

To start the service, execute the following shell script (note a server needs to be running see here):

# Download the latest version of the service
git clone git@github.com:ultravioletrs/cocos.git

cd cocos

# Compile the manager
make manager

# Set the environment variables and run the service
MANAGER_GRPC_URL=localhost:7001
MANAGER_LOG_LEVEL=debug \
MANAGER_QEMU_USE_SUDO=false \
MANAGER_QEMU_ENABLE_SEV=false \
./build/cocos-manager

To enable AMD SEV support, start manager like this

MANAGER_GRPC_URL=localhost:7001
MANAGER_LOG_LEVEL=debug \
MANAGER_QEMU_USE_SUDO=true \
MANAGER_QEMU_ENABLE_SEV=true \
MANAGER_QEMU_SEV_CBITPOS=51 \
./build/cocos-manager

To build the OVMF with the kernel hash capability, we must build the AmdSev package of OVMF. The result of the build should be a single OVMF.fd file (unlike the regular two OVFM files). The OVMF package is located at OvmfPkg/AmdSev/AmdSevX64.dsc.

To enable AMD SEV-SNP support, start manager like this

MANAGER_GRPC_URL=localhost:7001 \
MANAGER_LOG_LEVEL=debug \
MANAGER_QEMU_ENABLE_SEV=false \
MANAGER_QEMU_ENABLE_SEV_SNP=true \
MANAGER_QEMU_SEV_CBITPOS=51 \
MANAGER_QEMU_BIN_PATH=<path to QEMU binary> \
MANAGER_QEMU_QEMU_OVMF_CODE_FILE=<path to OVMF.fd Amd Sev built package> \
./build/cocos-manager

To include the kernel hash into the measurement of the attestation report (SEV or SEV-SNP), start manager like this

MANAGER_GRPC_URL=localhost:7001 \
MANAGER_LOG_LEVEL=debug \
MANAGER_QEMU_ENABLE_SEV=false \
MANAGER_QEMU_ENABLE_SEV_SNP=true \
MANAGER_QEMU_SEV_CBITPOS=51 \
MANAGER_QEMU_KERNEL_HASH=true \
MANAGER_QEMU_BIN_PATH=<path to QEMU binary> \
MANAGER_QEMU_QEMU_OVMF_CODE_FILE=<path to OVMF.fd Amd Sev built package> \
./build/cocos-manager
Verifying VM launch

NB: To verify that the manager successfully launched the VM, you need to open three terminals on the same machine. In one terminal, you need to launch the computations server by executing (with the environment variables of choice):

go run ./test/computations/main.go <dataset path> <algo path>

and in the second the manager by executing (with the environment variables of choice):

go run ./cmd/manager/main.go

Ensure that the Manager can connect to the Manager test server by setting the MANAGER_GRPC_PORT with the port value of the Manager test server. In the last terminal, you can run the verification commands.

To verify that the manager launched the VM successfully, run the following command:

ps aux | grep qemu-system-x86_64

You should get something similar to this

darko     324763 95.3  6.0 6398136 981044 ?      Sl   16:17   0:15 /usr/bin/qemu-system-x86_64 -enable-kvm -machine q35 -cpu EPYC -smp 4,maxcpus=64 -m 4096M,slots=5,maxmem=30G -drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=img/OVMF_VARS.fd -device virtio-scsi-pci,id=scsi,disable-legacy=on,iommu_platform=true -drive file=img/focal-server-cloudimg-amd64.img,if=none,id=disk0,format=qcow2 -device scsi-hd,drive=disk0 -netdev user,id=vmnic,hostfwd=tcp::2222-:22,hostfwd=tcp::9301-:9031,hostfwd=tcp::7020-:7002 -device virtio-net-pci,disable-legacy=on,iommu_platform=true,netdev=vmnic,romfile= -nographic -monitor pty

If you run a command as sudo, you should get the output similar to this one

root       37982  0.0  0.0   9444  4572 pts/0    S+   16:18   0:00 sudo /usr/local/bin/qemu-system-x86_64 -enable-kvm -machine q35 -cpu EPYC -smp 4,maxcpus=64 -m 4096M,slots=5,maxmem=30G -drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=img/OVMF_VARS.fd -device virtio-scsi-pci,id=scsi,disable-legacy=on,iommu_platform=true -drive file=img/focal-server-cloudimg-amd64.img,if=none,id=disk0,format=qcow2 -device scsi-hd,drive=disk0 -netdev user,id=vmnic,hostfwd=tcp::2222-:22,hostfwd=tcp::9301-:9031,hostfwd=tcp::7020-:7002 -device virtio-net-pci,disable-legacy=on,iommu_platform=true,netdev=vmnic,romfile= -object sev-guest,id=sev0,cbitpos=51,reduced-phys-bits=1 -machine memory-encryption=sev0 -nographic -monitor pty
root       37989  122 13.1 5345816 4252312 pts/0 Sl+  16:19   0:04 /usr/local/bin/qemu-system-x86_64 -enable-kvm -machine q35 -cpu EPYC -smp 4,maxcpus=64 -m 4096M,slots=5,maxmem=30G -drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=img/OVMF_VARS.fd -device virtio-scsi-pci,id=scsi,disable-legacy=on,iommu_platform=true -drive file=img/focal-server-cloudimg-amd64.img,if=none,id=disk0,format=qcow2 -device scsi-hd,drive=disk0 -netdev user,id=vmnic,hostfwd=tcp::2222-:22,hostfwd=tcp::9301-:9031,hostfwd=tcp::7020-:7002 -device virtio-net-pci,disable-legacy=on,iommu_platform=true,netdev=vmnic,romfile= -object sev-guest,id=sev0,cbitpos=51,reduced-phys-bits=1 -machine memory-encryption=sev0 -nographic -monitor pty

The two processes are due to the fact that we run the command /usr/bin/qemu-system-x86_64 as sudo, so there is one process for sudo command and the other for /usr/bin/qemu-system-x86_64.

Troubleshooting

If the ps aux | grep qemu-system-x86_64 give you something like this

darko      13913  0.0  0.0      0     0 pts/2    Z+   20:17   0:00 [qemu-system-x86] <defunct>

means that the a QEMU virtual machine that is currently defunct, meaning that it is no longer running. More precisely, the defunct process in the output is also known as a "zombie" process.

You can troubleshoot the VM launch procedure by running directly qemu-system-x86_64 command. When you run manager with MANAGER_LOG_LEVEL=info env var set, it prints out the entire command used to launch a VM. The relevant part of the log might look like this

{"level":"info","message":"/usr/bin/qemu-system-x86_64 -enable-kvm -machine q35 -cpu EPYC -smp 4,maxcpus=64 -m 4096M,slots=5,maxmem=30G -drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=img/OVMF_VARS.fd -device virtio-scsi-pci,id=scsi,disable-legacy=on,iommu_platform=true -drive file=img/focal-server-cloudimg-amd64.img,if=none,id=disk0,format=qcow2 -device scsi-hd,drive=disk0 -netdev user,id=vmnic,hostfwd=tcp::2222-:22,hostfwd=tcp::9301-:9031,hostfwd=tcp::7020-:7002 -device virtio-net-pci,disable-legacy=on,iommu_platform=true,netdev=vmnic,romfile= -nographic -monitor pty","ts":"2023-08-14T18:29:19.2653908Z"}

You can run the command - the value of the "message" key - directly in the terminal:

/usr/bin/qemu-system-x86_64 -enable-kvm -machine q35 -cpu EPYC -smp 4,maxcpus=64 -m 4096M,slots=5,maxmem=30G -drive if=pflash,format=raw,unit=0,file=/usr/share/OVMF/OVMF_CODE.fd,readonly=on -drive if=pflash,format=raw,unit=1,file=img/OVMF_VARS.fd -device virtio-scsi-pci,id=scsi,disable-legacy=on,iommu_platform=true -drive file=img/focal-server-cloudimg-amd64.img,if=none,id=disk0,format=qcow2 -device scsi-hd,drive=disk0 -netdev user,id=vmnic,hostfwd=tcp::2222-:22,hostfwd=tcp::9301-:9031,hostfwd=tcp::7020-:7002 -device virtio-net-pci,disable-legacy=on,iommu_platform=true,netdev=vmnic,romfile= -nographic -monitor pty

and look for the possible problems. This problems can usually be solved by using the adequate env var assignments. Look in the manager/qemu/config.go file to see the recognized env vars. Don't forget to prepend MANAGER_QEMU_ to the name of the env vars.

Kill qemu-system-x86_64 processes

To kill any leftover qemu-system-x86_64 processes, use

pkill -f qemu-system-x86_64

The pkill command is used to kill processes by name or by pattern. The -f flag to specify that we want to kill processes that match the pattern qemu-system-x86_64. It sends the SIGKILL signal to all processes that are running qemu-system-x86_64.

If this does not work, i.e. if ps aux | grep qemu-system-x86_64 still outputs qemu-system-x86_64 related process(es), you can kill the unwanted process with kill -9 <PID>, which also sends a SIGKILL signal to the process.

Usage

For more information about service capabilities and its usage, please check out the README documentation.

Documentation

Overview

Copyright (c) Ultraviolet SPDX-License-Identifier: Apache-2.0

Copyright (c) Ultraviolet SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	ManagerService_Process_FullMethodName = "/manager.ManagerService/Process"
)

Variables

View Source
var (
	// ErrMalformedEntity indicates malformed entity specification (e.g.
	// invalid username or password).
	ErrMalformedEntity = errors.New("malformed entity specification")

	// ErrUnauthorizedAccess indicates missing or invalid credentials provided
	// when accessing a protected resource.
	ErrUnauthorizedAccess = errors.New("missing or invalid credentials provided")

	// ErrNotFound indicates a non-existent entity request.
	ErrNotFound = errors.New("entity not found")

	// ErrFailedToAllocatePort indicates no free port was found on host.
	ErrFailedToAllocatePort = errors.New("failed to allocate free port on host")

	// ErrFailedToCalculateHash indicates that agent computation returned an error while calculating the hash of the computation.
	ErrFailedToCalculateHash = errors.New("error while calculating the hash of the computation")
)
View Source
var File_manager_manager_proto protoreflect.FileDescriptor
View Source
var ManagerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "manager.ManagerService",
	HandlerType: (*ManagerServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Process",
			Handler:       _ManagerService_Process_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "manager/manager.proto",
}

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

Functions

func RegisterManagerServiceServer

func RegisterManagerServiceServer(s grpc.ServiceRegistrar, srv ManagerServiceServer)

Types

type AgentConfig added in v0.4.0

type AgentConfig struct {
	Port         string `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"`
	Host         string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
	CertFile     string `protobuf:"bytes,3,opt,name=cert_file,json=certFile,proto3" json:"cert_file,omitempty"`
	KeyFile      string `protobuf:"bytes,4,opt,name=key_file,json=keyFile,proto3" json:"key_file,omitempty"`
	ClientCaFile string `protobuf:"bytes,5,opt,name=client_ca_file,json=clientCaFile,proto3" json:"client_ca_file,omitempty"`
	ServerCaFile string `protobuf:"bytes,6,opt,name=server_ca_file,json=serverCaFile,proto3" json:"server_ca_file,omitempty"`
	LogLevel     string `protobuf:"bytes,7,opt,name=log_level,json=logLevel,proto3" json:"log_level,omitempty"`
	AttestedTls  bool   `protobuf:"varint,8,opt,name=attested_tls,json=attestedTls,proto3" json:"attested_tls,omitempty"`
	// contains filtered or unexported fields
}

func (*AgentConfig) Descriptor deprecated added in v0.4.0

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

Deprecated: Use AgentConfig.ProtoReflect.Descriptor instead.

func (*AgentConfig) GetAttestedTls added in v0.4.0

func (x *AgentConfig) GetAttestedTls() bool

func (*AgentConfig) GetCertFile added in v0.4.0

func (x *AgentConfig) GetCertFile() string

func (*AgentConfig) GetClientCaFile added in v0.4.0

func (x *AgentConfig) GetClientCaFile() string

func (*AgentConfig) GetHost added in v0.4.0

func (x *AgentConfig) GetHost() string

func (*AgentConfig) GetKeyFile added in v0.4.0

func (x *AgentConfig) GetKeyFile() string

func (*AgentConfig) GetLogLevel added in v0.4.0

func (x *AgentConfig) GetLogLevel() string

func (*AgentConfig) GetPort added in v0.4.0

func (x *AgentConfig) GetPort() string

func (*AgentConfig) GetServerCaFile added in v0.4.0

func (x *AgentConfig) GetServerCaFile() string

func (*AgentConfig) ProtoMessage added in v0.4.0

func (*AgentConfig) ProtoMessage()

func (*AgentConfig) ProtoReflect added in v0.4.0

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

func (*AgentConfig) Reset added in v0.4.0

func (x *AgentConfig) Reset()

func (*AgentConfig) String added in v0.4.0

func (x *AgentConfig) String() string

type AgentEvent added in v0.4.0

type AgentEvent struct {
	EventType     string                 `protobuf:"bytes,1,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"`
	Timestamp     *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	ComputationId string                 `protobuf:"bytes,3,opt,name=computation_id,json=computationId,proto3" json:"computation_id,omitempty"`
	Details       []byte                 `protobuf:"bytes,4,opt,name=details,proto3" json:"details,omitempty"`
	Originator    string                 `protobuf:"bytes,5,opt,name=originator,proto3" json:"originator,omitempty"`
	Status        string                 `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*AgentEvent) Descriptor deprecated added in v0.4.0

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

Deprecated: Use AgentEvent.ProtoReflect.Descriptor instead.

func (*AgentEvent) GetComputationId added in v0.4.0

func (x *AgentEvent) GetComputationId() string

func (*AgentEvent) GetDetails added in v0.4.0

func (x *AgentEvent) GetDetails() []byte

func (*AgentEvent) GetEventType added in v0.4.0

func (x *AgentEvent) GetEventType() string

func (*AgentEvent) GetOriginator added in v0.4.0

func (x *AgentEvent) GetOriginator() string

func (*AgentEvent) GetStatus added in v0.4.0

func (x *AgentEvent) GetStatus() string

func (*AgentEvent) GetTimestamp added in v0.4.0

func (x *AgentEvent) GetTimestamp() *timestamppb.Timestamp

func (*AgentEvent) ProtoMessage added in v0.4.0

func (*AgentEvent) ProtoMessage()

func (*AgentEvent) ProtoReflect added in v0.4.0

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

func (*AgentEvent) Reset added in v0.4.0

func (x *AgentEvent) Reset()

func (*AgentEvent) String added in v0.4.0

func (x *AgentEvent) String() string

type AgentLog added in v0.4.0

type AgentLog struct {
	Message       string                 `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	ComputationId string                 `protobuf:"bytes,2,opt,name=computation_id,json=computationId,proto3" json:"computation_id,omitempty"`
	Level         string                 `protobuf:"bytes,3,opt,name=level,proto3" json:"level,omitempty"`
	Timestamp     *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*AgentLog) Descriptor deprecated added in v0.4.0

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

Deprecated: Use AgentLog.ProtoReflect.Descriptor instead.

func (*AgentLog) GetComputationId added in v0.4.0

func (x *AgentLog) GetComputationId() string

func (*AgentLog) GetLevel added in v0.4.0

func (x *AgentLog) GetLevel() string

func (*AgentLog) GetMessage added in v0.4.0

func (x *AgentLog) GetMessage() string

func (*AgentLog) GetTimestamp added in v0.4.0

func (x *AgentLog) GetTimestamp() *timestamppb.Timestamp

func (*AgentLog) ProtoMessage added in v0.4.0

func (*AgentLog) ProtoMessage()

func (*AgentLog) ProtoReflect added in v0.4.0

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

func (*AgentLog) Reset added in v0.4.0

func (x *AgentLog) Reset()

func (*AgentLog) String added in v0.4.0

func (x *AgentLog) String() string

type Algorithm

type Algorithm struct {
	Hash    []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // should be sha3.Sum256, 32 byte length.
	UserKey []byte `protobuf:"bytes,2,opt,name=userKey,proto3" json:"userKey,omitempty"`
	// contains filtered or unexported fields
}

func (*Algorithm) Descriptor deprecated

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

Deprecated: Use Algorithm.ProtoReflect.Descriptor instead.

func (*Algorithm) GetHash added in v0.4.0

func (x *Algorithm) GetHash() []byte

func (*Algorithm) GetUserKey added in v0.4.0

func (x *Algorithm) GetUserKey() []byte

func (*Algorithm) ProtoMessage

func (*Algorithm) ProtoMessage()

func (*Algorithm) ProtoReflect

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

func (*Algorithm) Reset

func (x *Algorithm) Reset()

func (*Algorithm) String

func (x *Algorithm) String() string

type AttestationPolicy added in v0.4.0

type AttestationPolicy struct {
	Info []byte `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	Id   string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*AttestationPolicy) Descriptor deprecated added in v0.4.0

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

Deprecated: Use AttestationPolicy.ProtoReflect.Descriptor instead.

func (*AttestationPolicy) GetId added in v0.4.0

func (x *AttestationPolicy) GetId() string

func (*AttestationPolicy) GetInfo added in v0.4.0

func (x *AttestationPolicy) GetInfo() []byte

func (*AttestationPolicy) ProtoMessage added in v0.4.0

func (*AttestationPolicy) ProtoMessage()

func (*AttestationPolicy) ProtoReflect added in v0.4.0

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

func (*AttestationPolicy) Reset added in v0.4.0

func (x *AttestationPolicy) Reset()

func (*AttestationPolicy) String added in v0.4.0

func (x *AttestationPolicy) String() string

type AttestationPolicyReq added in v0.4.0

type AttestationPolicyReq struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*AttestationPolicyReq) Descriptor deprecated added in v0.4.0

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

Deprecated: Use AttestationPolicyReq.ProtoReflect.Descriptor instead.

func (*AttestationPolicyReq) GetId added in v0.4.0

func (x *AttestationPolicyReq) GetId() string

func (*AttestationPolicyReq) ProtoMessage added in v0.4.0

func (*AttestationPolicyReq) ProtoMessage()

func (*AttestationPolicyReq) ProtoReflect added in v0.4.0

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

func (*AttestationPolicyReq) Reset added in v0.4.0

func (x *AttestationPolicyReq) Reset()

func (*AttestationPolicyReq) String added in v0.4.0

func (x *AttestationPolicyReq) String() string

type ClientStreamMessage added in v0.4.0

type ClientStreamMessage struct {

	// Types that are assignable to Message:
	//
	//	*ClientStreamMessage_AgentLog
	//	*ClientStreamMessage_AgentEvent
	//	*ClientStreamMessage_RunRes
	//	*ClientStreamMessage_AttestationPolicy
	//	*ClientStreamMessage_StopComputationRes
	//	*ClientStreamMessage_SvmInfo
	Message isClientStreamMessage_Message `protobuf_oneof:"message"`
	// contains filtered or unexported fields
}

func (*ClientStreamMessage) Descriptor deprecated added in v0.4.0

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

Deprecated: Use ClientStreamMessage.ProtoReflect.Descriptor instead.

func (*ClientStreamMessage) GetAgentEvent added in v0.4.0

func (x *ClientStreamMessage) GetAgentEvent() *AgentEvent

func (*ClientStreamMessage) GetAgentLog added in v0.4.0

func (x *ClientStreamMessage) GetAgentLog() *AgentLog

func (*ClientStreamMessage) GetAttestationPolicy added in v0.4.0

func (x *ClientStreamMessage) GetAttestationPolicy() *AttestationPolicy

func (*ClientStreamMessage) GetMessage added in v0.4.0

func (m *ClientStreamMessage) GetMessage() isClientStreamMessage_Message

func (*ClientStreamMessage) GetRunRes added in v0.4.0

func (x *ClientStreamMessage) GetRunRes() *RunResponse

func (*ClientStreamMessage) GetStopComputationRes added in v0.4.0

func (x *ClientStreamMessage) GetStopComputationRes() *StopComputationResponse

func (*ClientStreamMessage) GetSvmInfo added in v0.4.0

func (x *ClientStreamMessage) GetSvmInfo() *SVMInfo

func (*ClientStreamMessage) ProtoMessage added in v0.4.0

func (*ClientStreamMessage) ProtoMessage()

func (*ClientStreamMessage) ProtoReflect added in v0.4.0

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

func (*ClientStreamMessage) Reset added in v0.4.0

func (x *ClientStreamMessage) Reset()

func (*ClientStreamMessage) String added in v0.4.0

func (x *ClientStreamMessage) String() string

type ClientStreamMessage_AgentEvent added in v0.4.0

type ClientStreamMessage_AgentEvent struct {
	AgentEvent *AgentEvent `protobuf:"bytes,2,opt,name=agent_event,json=agentEvent,proto3,oneof"`
}

type ClientStreamMessage_AgentLog added in v0.4.0

type ClientStreamMessage_AgentLog struct {
	AgentLog *AgentLog `protobuf:"bytes,1,opt,name=agent_log,json=agentLog,proto3,oneof"`
}

type ClientStreamMessage_AttestationPolicy added in v0.4.0

type ClientStreamMessage_AttestationPolicy struct {
	AttestationPolicy *AttestationPolicy `protobuf:"bytes,4,opt,name=attestationPolicy,proto3,oneof"`
}

type ClientStreamMessage_RunRes added in v0.4.0

type ClientStreamMessage_RunRes struct {
	RunRes *RunResponse `protobuf:"bytes,3,opt,name=run_res,json=runRes,proto3,oneof"`
}

type ClientStreamMessage_StopComputationRes added in v0.4.0

type ClientStreamMessage_StopComputationRes struct {
	StopComputationRes *StopComputationResponse `protobuf:"bytes,5,opt,name=stopComputationRes,proto3,oneof"`
}

type ClientStreamMessage_SvmInfo added in v0.4.0

type ClientStreamMessage_SvmInfo struct {
	SvmInfo *SVMInfo `protobuf:"bytes,6,opt,name=svm_info,json=svmInfo,proto3,oneof"`
}

type ComputationRunReq added in v0.4.0

type ComputationRunReq struct {
	Id              string            `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name            string            `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Description     string            `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Datasets        []*Dataset        `protobuf:"bytes,4,rep,name=datasets,proto3" json:"datasets,omitempty"`
	Algorithm       *Algorithm        `protobuf:"bytes,5,opt,name=algorithm,proto3" json:"algorithm,omitempty"`
	ResultConsumers []*ResultConsumer `protobuf:"bytes,6,rep,name=result_consumers,json=resultConsumers,proto3" json:"result_consumers,omitempty"`
	AgentConfig     *AgentConfig      `protobuf:"bytes,7,opt,name=agent_config,json=agentConfig,proto3" json:"agent_config,omitempty"`
	// contains filtered or unexported fields
}

func (*ComputationRunReq) Descriptor deprecated added in v0.4.0

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

Deprecated: Use ComputationRunReq.ProtoReflect.Descriptor instead.

func (*ComputationRunReq) GetAgentConfig added in v0.4.0

func (x *ComputationRunReq) GetAgentConfig() *AgentConfig

func (*ComputationRunReq) GetAlgorithm added in v0.4.0

func (x *ComputationRunReq) GetAlgorithm() *Algorithm

func (*ComputationRunReq) GetDatasets added in v0.4.0

func (x *ComputationRunReq) GetDatasets() []*Dataset

func (*ComputationRunReq) GetDescription added in v0.4.0

func (x *ComputationRunReq) GetDescription() string

func (*ComputationRunReq) GetId added in v0.4.0

func (x *ComputationRunReq) GetId() string

func (*ComputationRunReq) GetName added in v0.4.0

func (x *ComputationRunReq) GetName() string

func (*ComputationRunReq) GetResultConsumers added in v0.4.0

func (x *ComputationRunReq) GetResultConsumers() []*ResultConsumer

func (*ComputationRunReq) ProtoMessage added in v0.4.0

func (*ComputationRunReq) ProtoMessage()

func (*ComputationRunReq) ProtoReflect added in v0.4.0

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

func (*ComputationRunReq) Reset added in v0.4.0

func (x *ComputationRunReq) Reset()

func (*ComputationRunReq) String added in v0.4.0

func (x *ComputationRunReq) String() string

type Dataset

type Dataset struct {
	Hash     []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // should be sha3.Sum256, 32 byte length.
	UserKey  []byte `protobuf:"bytes,2,opt,name=userKey,proto3" json:"userKey,omitempty"`
	Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"`
	// contains filtered or unexported fields
}

func (*Dataset) Descriptor deprecated

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

Deprecated: Use Dataset.ProtoReflect.Descriptor instead.

func (*Dataset) GetFilename added in v0.4.0

func (x *Dataset) GetFilename() string

func (*Dataset) GetHash added in v0.4.0

func (x *Dataset) GetHash() []byte

func (*Dataset) GetUserKey added in v0.4.0

func (x *Dataset) GetUserKey() []byte

func (*Dataset) ProtoMessage

func (*Dataset) ProtoMessage()

func (*Dataset) ProtoReflect

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

func (*Dataset) Reset

func (x *Dataset) Reset()

func (*Dataset) String

func (x *Dataset) String() string

type ManagerServiceClient

type ManagerServiceClient interface {
	Process(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ClientStreamMessage, ServerStreamMessage], error)
}

ManagerServiceClient is the client API for ManagerService 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 ManagerServiceServer

type ManagerServiceServer interface {
	Process(grpc.BidiStreamingServer[ClientStreamMessage, ServerStreamMessage]) error
	// contains filtered or unexported methods
}

ManagerServiceServer is the server API for ManagerService service. All implementations must embed UnimplementedManagerServiceServer for forward compatibility.

type ManagerService_ProcessClient added in v0.4.0

type ManagerService_ProcessClient = grpc.BidiStreamingClient[ClientStreamMessage, ServerStreamMessage]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ManagerService_ProcessServer added in v0.4.0

type ManagerService_ProcessServer = grpc.BidiStreamingServer[ClientStreamMessage, ServerStreamMessage]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type ResultConsumer added in v0.4.0

type ResultConsumer struct {
	UserKey []byte `protobuf:"bytes,1,opt,name=userKey,proto3" json:"userKey,omitempty"`
	// contains filtered or unexported fields
}

func (*ResultConsumer) Descriptor deprecated added in v0.4.0

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

Deprecated: Use ResultConsumer.ProtoReflect.Descriptor instead.

func (*ResultConsumer) GetUserKey added in v0.4.0

func (x *ResultConsumer) GetUserKey() []byte

func (*ResultConsumer) ProtoMessage added in v0.4.0

func (*ResultConsumer) ProtoMessage()

func (*ResultConsumer) ProtoReflect added in v0.4.0

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

func (*ResultConsumer) Reset added in v0.4.0

func (x *ResultConsumer) Reset()

func (*ResultConsumer) String added in v0.4.0

func (x *ResultConsumer) String() string

type RunReqChunks added in v0.4.0

type RunReqChunks struct {
	Data   []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	Id     string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	IsLast bool   `protobuf:"varint,3,opt,name=is_last,json=isLast,proto3" json:"is_last,omitempty"`
	// contains filtered or unexported fields
}

func (*RunReqChunks) Descriptor deprecated added in v0.4.0

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

Deprecated: Use RunReqChunks.ProtoReflect.Descriptor instead.

func (*RunReqChunks) GetData added in v0.4.0

func (x *RunReqChunks) GetData() []byte

func (*RunReqChunks) GetId added in v0.4.0

func (x *RunReqChunks) GetId() string

func (*RunReqChunks) GetIsLast added in v0.4.0

func (x *RunReqChunks) GetIsLast() bool

func (*RunReqChunks) ProtoMessage added in v0.4.0

func (*RunReqChunks) ProtoMessage()

func (*RunReqChunks) ProtoReflect added in v0.4.0

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

func (*RunReqChunks) Reset added in v0.4.0

func (x *RunReqChunks) Reset()

func (*RunReqChunks) String added in v0.4.0

func (x *RunReqChunks) String() string

type RunResponse

type RunResponse struct {
	AgentPort     string `protobuf:"bytes,1,opt,name=agent_port,json=agentPort,proto3" json:"agent_port,omitempty"`
	ComputationId string `protobuf:"bytes,2,opt,name=computation_id,json=computationId,proto3" json:"computation_id,omitempty"`
	// contains filtered or unexported fields
}

func (*RunResponse) Descriptor deprecated

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

Deprecated: Use RunResponse.ProtoReflect.Descriptor instead.

func (*RunResponse) GetAgentPort added in v0.4.0

func (x *RunResponse) GetAgentPort() string

func (*RunResponse) GetComputationId added in v0.4.0

func (x *RunResponse) GetComputationId() string

func (*RunResponse) ProtoMessage

func (*RunResponse) ProtoMessage()

func (*RunResponse) ProtoReflect

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

func (*RunResponse) Reset

func (x *RunResponse) Reset()

func (*RunResponse) String

func (x *RunResponse) String() string

type SVMInfo added in v0.4.0

type SVMInfo struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	OvmfVersion string `protobuf:"bytes,2,opt,name=ovmf_version,json=ovmfVersion,proto3" json:"ovmf_version,omitempty"`
	CpuNum      int32  `protobuf:"varint,3,opt,name=cpu_num,json=cpuNum,proto3" json:"cpu_num,omitempty"`
	CpuType     string `protobuf:"bytes,4,opt,name=cpu_type,json=cpuType,proto3" json:"cpu_type,omitempty"`
	KernelCmd   string `protobuf:"bytes,5,opt,name=kernel_cmd,json=kernelCmd,proto3" json:"kernel_cmd,omitempty"`
	EosVersion  string `protobuf:"bytes,6,opt,name=eos_version,json=eosVersion,proto3" json:"eos_version,omitempty"`
	// contains filtered or unexported fields
}

func (*SVMInfo) Descriptor deprecated added in v0.4.0

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

Deprecated: Use SVMInfo.ProtoReflect.Descriptor instead.

func (*SVMInfo) GetCpuNum added in v0.4.0

func (x *SVMInfo) GetCpuNum() int32

func (*SVMInfo) GetCpuType added in v0.4.0

func (x *SVMInfo) GetCpuType() string

func (*SVMInfo) GetEosVersion added in v0.4.0

func (x *SVMInfo) GetEosVersion() string

func (*SVMInfo) GetId added in v0.4.0

func (x *SVMInfo) GetId() string

func (*SVMInfo) GetKernelCmd added in v0.4.0

func (x *SVMInfo) GetKernelCmd() string

func (*SVMInfo) GetOvmfVersion added in v0.4.0

func (x *SVMInfo) GetOvmfVersion() string

func (*SVMInfo) ProtoMessage added in v0.4.0

func (*SVMInfo) ProtoMessage()

func (*SVMInfo) ProtoReflect added in v0.4.0

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

func (*SVMInfo) Reset added in v0.4.0

func (x *SVMInfo) Reset()

func (*SVMInfo) String added in v0.4.0

func (x *SVMInfo) String() string

type SVMInfoReq added in v0.4.0

type SVMInfoReq struct {
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*SVMInfoReq) Descriptor deprecated added in v0.4.0

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

Deprecated: Use SVMInfoReq.ProtoReflect.Descriptor instead.

func (*SVMInfoReq) GetId added in v0.4.0

func (x *SVMInfoReq) GetId() string

func (*SVMInfoReq) ProtoMessage added in v0.4.0

func (*SVMInfoReq) ProtoMessage()

func (*SVMInfoReq) ProtoReflect added in v0.4.0

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

func (*SVMInfoReq) Reset added in v0.4.0

func (x *SVMInfoReq) Reset()

func (*SVMInfoReq) String added in v0.4.0

func (x *SVMInfoReq) String() string

type ServerStreamMessage added in v0.4.0

type ServerStreamMessage struct {

	// Types that are assignable to Message:
	//
	//	*ServerStreamMessage_RunReqChunks
	//	*ServerStreamMessage_RunReq
	//	*ServerStreamMessage_TerminateReq
	//	*ServerStreamMessage_StopComputation
	//	*ServerStreamMessage_AttestationPolicyReq
	//	*ServerStreamMessage_SvmInfoReq
	Message isServerStreamMessage_Message `protobuf_oneof:"message"`
	// contains filtered or unexported fields
}

func (*ServerStreamMessage) Descriptor deprecated added in v0.4.0

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

Deprecated: Use ServerStreamMessage.ProtoReflect.Descriptor instead.

func (*ServerStreamMessage) GetAttestationPolicyReq added in v0.4.0

func (x *ServerStreamMessage) GetAttestationPolicyReq() *AttestationPolicyReq

func (*ServerStreamMessage) GetMessage added in v0.4.0

func (m *ServerStreamMessage) GetMessage() isServerStreamMessage_Message

func (*ServerStreamMessage) GetRunReq added in v0.4.0

func (x *ServerStreamMessage) GetRunReq() *ComputationRunReq

func (*ServerStreamMessage) GetRunReqChunks added in v0.4.0

func (x *ServerStreamMessage) GetRunReqChunks() *RunReqChunks

func (*ServerStreamMessage) GetStopComputation added in v0.4.0

func (x *ServerStreamMessage) GetStopComputation() *StopComputation

func (*ServerStreamMessage) GetSvmInfoReq added in v0.4.0

func (x *ServerStreamMessage) GetSvmInfoReq() *SVMInfoReq

func (*ServerStreamMessage) GetTerminateReq added in v0.4.0

func (x *ServerStreamMessage) GetTerminateReq() *Terminate

func (*ServerStreamMessage) ProtoMessage added in v0.4.0

func (*ServerStreamMessage) ProtoMessage()

func (*ServerStreamMessage) ProtoReflect added in v0.4.0

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

func (*ServerStreamMessage) Reset added in v0.4.0

func (x *ServerStreamMessage) Reset()

func (*ServerStreamMessage) String added in v0.4.0

func (x *ServerStreamMessage) String() string

type ServerStreamMessage_AttestationPolicyReq added in v0.4.0

type ServerStreamMessage_AttestationPolicyReq struct {
	AttestationPolicyReq *AttestationPolicyReq `protobuf:"bytes,5,opt,name=attestationPolicyReq,proto3,oneof"`
}

type ServerStreamMessage_RunReq added in v0.4.0

type ServerStreamMessage_RunReq struct {
	RunReq *ComputationRunReq `protobuf:"bytes,2,opt,name=runReq,proto3,oneof"`
}

type ServerStreamMessage_RunReqChunks added in v0.4.0

type ServerStreamMessage_RunReqChunks struct {
	RunReqChunks *RunReqChunks `protobuf:"bytes,1,opt,name=runReqChunks,proto3,oneof"`
}

type ServerStreamMessage_StopComputation added in v0.4.0

type ServerStreamMessage_StopComputation struct {
	StopComputation *StopComputation `protobuf:"bytes,4,opt,name=stopComputation,proto3,oneof"`
}

type ServerStreamMessage_SvmInfoReq added in v0.4.0

type ServerStreamMessage_SvmInfoReq struct {
	SvmInfoReq *SVMInfoReq `protobuf:"bytes,6,opt,name=svmInfoReq,proto3,oneof"`
}

type ServerStreamMessage_TerminateReq added in v0.4.0

type ServerStreamMessage_TerminateReq struct {
	TerminateReq *Terminate `protobuf:"bytes,3,opt,name=terminateReq,proto3,oneof"`
}

type Service

type Service interface {
	// Run create a computation.
	Run(ctx context.Context, c *ComputationRunReq) (string, error)
	// Stop stops a computation.
	Stop(ctx context.Context, computationID string) error
	// FetchAttestationPolicy measures and fetches the attestation policy.
	FetchAttestationPolicy(ctx context.Context, computationID string) ([]byte, error)
	// ReportBrokenConnection reports a broken connection.
	ReportBrokenConnection(addr string)
	// ReturnSVMInfo returns SVM information needed for attestation verification and validation.
	ReturnSVMInfo(ctx context.Context) (string, int, string, string)
}

Service specifies an API that must be fulfilled by the domain service implementation, and all of its decorators (e.g. logging & metrics).

func New

func New(cfg qemu.Config, attestationPolicyBinPath string, logger *slog.Logger, eventsChan chan *ClientStreamMessage, vmFactory vm.Provider, eosVersion string) (Service, error)

New instantiates the manager service implementation.

type StopComputation added in v0.4.0

type StopComputation struct {
	ComputationId string `protobuf:"bytes,1,opt,name=computation_id,json=computationId,proto3" json:"computation_id,omitempty"`
	// contains filtered or unexported fields
}

func (*StopComputation) Descriptor deprecated added in v0.4.0

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

Deprecated: Use StopComputation.ProtoReflect.Descriptor instead.

func (*StopComputation) GetComputationId added in v0.4.0

func (x *StopComputation) GetComputationId() string

func (*StopComputation) ProtoMessage added in v0.4.0

func (*StopComputation) ProtoMessage()

func (*StopComputation) ProtoReflect added in v0.4.0

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

func (*StopComputation) Reset added in v0.4.0

func (x *StopComputation) Reset()

func (*StopComputation) String added in v0.4.0

func (x *StopComputation) String() string

type StopComputationResponse added in v0.4.0

type StopComputationResponse struct {
	ComputationId string `protobuf:"bytes,1,opt,name=computation_id,json=computationId,proto3" json:"computation_id,omitempty"`
	Message       string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*StopComputationResponse) Descriptor deprecated added in v0.4.0

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

Deprecated: Use StopComputationResponse.ProtoReflect.Descriptor instead.

func (*StopComputationResponse) GetComputationId added in v0.4.0

func (x *StopComputationResponse) GetComputationId() string

func (*StopComputationResponse) GetMessage added in v0.4.0

func (x *StopComputationResponse) GetMessage() string

func (*StopComputationResponse) ProtoMessage added in v0.4.0

func (*StopComputationResponse) ProtoMessage()

func (*StopComputationResponse) ProtoReflect added in v0.4.0

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

func (*StopComputationResponse) Reset added in v0.4.0

func (x *StopComputationResponse) Reset()

func (*StopComputationResponse) String added in v0.4.0

func (x *StopComputationResponse) String() string

type Terminate added in v0.4.0

type Terminate struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*Terminate) Descriptor deprecated added in v0.4.0

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

Deprecated: Use Terminate.ProtoReflect.Descriptor instead.

func (*Terminate) GetMessage added in v0.4.0

func (x *Terminate) GetMessage() string

func (*Terminate) ProtoMessage added in v0.4.0

func (*Terminate) ProtoMessage()

func (*Terminate) ProtoReflect added in v0.4.0

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

func (*Terminate) Reset added in v0.4.0

func (x *Terminate) Reset()

func (*Terminate) String added in v0.4.0

func (x *Terminate) String() string

type UnimplementedManagerServiceServer

type UnimplementedManagerServiceServer struct{}

UnimplementedManagerServiceServer 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 (UnimplementedManagerServiceServer) Process added in v0.4.0

type UnsafeManagerServiceServer

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

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

Directories

Path Synopsis
api
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
Package tracing provides tracing instrumentation for cocos auth service.
Package tracing provides tracing instrumentation for cocos auth service.
vm

Jump to

Keyboard shortcuts

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