Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutor ¶
func NewExecutor( base remoteworker.Executor[*Action[object.GlobalReference], model_core.Decodable[object.LocalReference], model_core.Decodable[object.LocalReference]], ) remoteworker.Executor[*model_executewithstorage_pb.Action, *model_core_pb.WeakDecodableReference, *model_core_pb.WeakDecodableReference]
NewExecutor creates a decorator for the remote worker executor that makes it simpler to run actions on workers that make use of the "executewithstorage" protocol (i.e., workers that rely on actions, execution events, and results to be backed by object storage).
The advantage of using this decorator is that the caller can use native types for decodable references, as opposed to sending and receiving their Protobuf message equivalents.
func NewNamespaceAddingClient ¶
func NewNamespaceAddingClient[TNamespace namespacemapping.NamespaceAddingNamespace[TReference], TReference any]( base remoteexecution.Client[*Action[TReference], model_core.Decodable[object.LocalReference], model_core.Decodable[object.LocalReference]], namespace TNamespace, ) remoteexecution.Client[*Action[object.LocalReference], model_core.Decodable[object.LocalReference], model_core.Decodable[object.LocalReference]]
NewNamespaceAddingClient creates a decorator for a remote execution client that can add a namespace (e.g., instance name) to any outgoing execution requests. This decorator can be used to abstract away the notion of instance names in contexts where local object references are sufficient.
func NewObjectExportingClient ¶
func NewObjectExportingClient[TInternal, TExternal any]( base remoteexecution.Client[*Action[TExternal], model_core.Decodable[TExternal], model_core.Decodable[TExternal]], exporter model_core.ObjectExporter[TInternal, TExternal], ) remoteexecution.Client[*Action[TInternal], model_core.Decodable[TInternal], model_core.Decodable[TInternal]]
NewObjectExportingClient creates a decorator for the remote execution client that converts references of actions, execution events and results from one reference format to another.
This decorator can be used to force flushing of objects that only reside in local memory to storage, so that the worker executing the action has access to them as well.
func NewProtoClient ¶
func NewProtoClient( base remoteexecution.Client[*model_executewithstorage_pb.Action, *model_core_pb.WeakDecodableReference, *model_core_pb.WeakDecodableReference], ) remoteexecution.Client[*Action[object.GlobalReference], model_core.Decodable[object.LocalReference], model_core.Decodable[object.LocalReference]]
NewProtoClient creates a decorator for the remote execution client that makes it simpler to run actions on workers that make use of the "executewithstorage" protocol (i.e., workers that rely on actions, execution events, and results to be backed by object storage).
The advantage of using this decorator is that the caller can use native types for decodable references, as opposed to sending and receiving their Protobuf message equivalents.
Types ¶
type Action ¶
type Action[TReference any] struct { Reference model_core.Decodable[TReference] Encoders []*model_encoding_pb.BinaryEncoder Format *model_core_pb.ObjectFormat }
Action that a client wants to run on a worker. The actual definition of the action is stored in an object.
In addition to the reference, this struct contains the encoders that the client used to create the object, allowing the worker to decode it. The format needs to be provided so that the worker can reject misrouted requests.