wrench::RegisteredFunction

class RegisteredFunction

Represents a serverless function, encapsulating its metadata and behavior.

Public Functions

RegisteredFunction(const std::shared_ptr<Function> &function, double time_limit_in_seconds, sg_size_t disk_space_limit_in_bytes, sg_size_t RAM_limit_in_bytes, sg_size_t ingress_in_bytes, sg_size_t egress_in_bytes)

Constructor.

Parameters:
  • function – The function to be registered.

  • time_limit_in_seconds – The time limit for the function execution.

  • disk_space_limit_in_bytes – The disk space limit for the function.

  • RAM_limit_in_bytes – The RAM limit for the function.

  • ingress_in_bytes – The ingress data limit for the function.

  • egress_in_bytes – The egress data limit for the function.

sg_size_t getDiskSpaceLimit() const

Get the registered function’s disk space limit.

Returns:

A RAN limit in bytes

std::shared_ptr<Function> getFunction()

Get the registered function’s actual function implementation.

Returns:

A function

std::shared_ptr<DataFile> getImageFile() const

Get the registered function’s image file.

Returns:

A file

std::shared_ptr<FileLocation> getOriginalImageLocation() const

Get the authoritative (i.e., in a repo) location of the registered function’s image.

Returns:

A file location

sg_size_t getRAMLimit() const

Get the registered function’s RAM limit.

Returns:

A RAN limit in bytes

double getTimeLimit() const

Get the registered function’s time limit.

Returns:

A time limit in seconds