Protocol definition

The momotor.rpc.proto package contains the gRPC protocol definitions and the generated Python code for them.

Documentation for the RPC services and messages can be found in the protocol files.

Asset

syntax = "proto3";

import "momotor/rpc/proto/exception.proto";

package momotor.rpc.proto;

enum Category {
    NO_CATEGORY = 0;
    RECIPE = 1;
    CONFIG = 2;
    PRODUCT = 3;
    RESULT = 4;
};

message AssetQuery {
    Category category = 1;  // required
    string testId = 2;  // optional
    string stepId = 3;  // optional
    repeated uint32 taskNumber = 4;  // optional
}

enum AssetFormat {
    NO_ASSET_FORMAT = 0;
    XML = 1;
    ZIP = 2;
};

message AssetData {
    AssetQuery query = 1; // required
    string name = 2;  // optional
    AssetFormat format = 3;  // required
    uint64 size = 4;  // required
    bytes hash = 5;  // required. A base58 encoded multihash (see https://github.com/multiformats/multihash)
                     // momotor.rpc.consts contains constants for the required encoding and the preferred hashing
                     // algorithm.
                     // 'identity' hash function is supported, ie. short content encoded in the hash field itself
};

message UploadAssetRequest {
    string jobId = 1;  // required for first element in the stream

    // First element in the stream must be 'assetData', subsequent elements must be 'chunk'
    oneof request {
        AssetData assetData = 2;
        bytes chunk = 3;
    }
};

message UploadAssetResponse {
    bool assetSelected = 1;  // required, unless there is an exception
    Exception exception = 1000;  // optional
};

message DownloadAssetRequest {
    string jobId = 1;  // required for first element in the stream for workers, optional for clients

    // First element in the stream must be 'query', second element on the stream is 'accepted'
    oneof request {
        AssetQuery query = 2;
        bool accepted = 3;  // If not accepted, the download is stopped immediately
    }
}

message DownloadAssetResponse {
    // First response will be 'data', subsequent responses 'chunk'
    oneof response {
        AssetData data = 1;
        bytes chunk = 2;
    }
    Exception exception = 1000;
}

Generated protocol buffer code.

class momotor.rpc.proto.asset_pb2.AssetQuery
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

category

Field momotor.rpc.proto.AssetQuery.category

stepId

Field momotor.rpc.proto.AssetQuery.stepId

taskNumber

Field momotor.rpc.proto.AssetQuery.taskNumber

testId

Field momotor.rpc.proto.AssetQuery.testId

class momotor.rpc.proto.asset_pb2.AssetData
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

format

Field momotor.rpc.proto.AssetData.format

hash

Field momotor.rpc.proto.AssetData.hash

name

Field momotor.rpc.proto.AssetData.name

query

Field momotor.rpc.proto.AssetData.query

size

Field momotor.rpc.proto.AssetData.size

class momotor.rpc.proto.asset_pb2.UploadAssetRequest
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

assetData

Field momotor.rpc.proto.UploadAssetRequest.assetData

chunk

Field momotor.rpc.proto.UploadAssetRequest.chunk

jobId

Field momotor.rpc.proto.UploadAssetRequest.jobId

class momotor.rpc.proto.asset_pb2.UploadAssetResponse
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

assetSelected

Field momotor.rpc.proto.UploadAssetResponse.assetSelected

exception

Field momotor.rpc.proto.UploadAssetResponse.exception

class momotor.rpc.proto.asset_pb2.DownloadAssetRequest
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

accepted

Field momotor.rpc.proto.DownloadAssetRequest.accepted

jobId

Field momotor.rpc.proto.DownloadAssetRequest.jobId

query

Field momotor.rpc.proto.DownloadAssetRequest.query

class momotor.rpc.proto.asset_pb2.DownloadAssetResponse
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

chunk

Field momotor.rpc.proto.DownloadAssetResponse.chunk

data

Field momotor.rpc.proto.DownloadAssetResponse.data

exception

Field momotor.rpc.proto.DownloadAssetResponse.exception

Auth

syntax = "proto3";

import "google/protobuf/empty.proto";
import "momotor/rpc/proto/exception.proto";

package momotor.rpc.proto;

message ServerInfoResponse {
    string version = 1;  // Server version number, required
    string protoVersion = 2;  // Protocol (package momotor.rpc) version number, required
    uint64 chunkSize = 3;  // Recommended chunk size, required
    uint64 maxIdHashLen = 4;  // Maximum length of content encoded as hash, optional. Identity hashes are only supported if provided
    repeated uint64 hashFunc = 5; // Supported multihash hash functions, required. Listed from most to least preferred. Excluding code 0 for identity hash
    uint32 progressUpdateInterval = 6;  // Interval (in seconds) that workers need to send status updates to the broker
}

message AuthenticateRequest {
    oneof request {
        string apiKey = 1;
        bytes challengeResponse = 2;
    }
}

message Challenge {
    bytes value = 1;
    string salt = 2;
}

message AuthenticateResponse {
    oneof response {
        Challenge challenge = 1;
        string authToken = 2;
        Exception exception = 1000;
    }
}

service Auth {
    // Get server info (does not require authentication)
    rpc serverInfo (google.protobuf.Empty) returns (ServerInfoResponse);

    // Authenticate the client to get an authKey for use with the requests on the other endpoints
    rpc authenticate (stream AuthenticateRequest) returns (stream AuthenticateResponse);
}
class momotor.rpc.proto.auth_grpc.AuthBase
abstract async serverInfo(stream)
Return type

None

abstract async authenticate(stream)
Return type

None

class momotor.rpc.proto.auth_grpc.AuthStub(channel)

Generated protocol buffer code.

class momotor.rpc.proto.auth_pb2.ServerInfoResponse
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

chunkSize

Field momotor.rpc.proto.ServerInfoResponse.chunkSize

hashFunc

Field momotor.rpc.proto.ServerInfoResponse.hashFunc

maxIdHashLen

Field momotor.rpc.proto.ServerInfoResponse.maxIdHashLen

progressUpdateInterval

Field momotor.rpc.proto.ServerInfoResponse.progressUpdateInterval

protoVersion

Field momotor.rpc.proto.ServerInfoResponse.protoVersion

version

Field momotor.rpc.proto.ServerInfoResponse.version

class momotor.rpc.proto.auth_pb2.AuthenticateRequest
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

apiKey

Field momotor.rpc.proto.AuthenticateRequest.apiKey

challengeResponse

Field momotor.rpc.proto.AuthenticateRequest.challengeResponse

class momotor.rpc.proto.auth_pb2.Challenge
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

salt

Field momotor.rpc.proto.Challenge.salt

value

Field momotor.rpc.proto.Challenge.value

class momotor.rpc.proto.auth_pb2.AuthenticateResponse
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

authToken

Field momotor.rpc.proto.AuthenticateResponse.authToken

challenge

Field momotor.rpc.proto.AuthenticateResponse.challenge

exception

Field momotor.rpc.proto.AuthenticateResponse.exception

Client

syntax = "proto3";

import "google/protobuf/empty.proto";
import "momotor/rpc/proto/asset.proto";
import "momotor/rpc/proto/job.proto";

package momotor.rpc.proto;

// Service for Momotor clients to start a job
service Client {
    // Begin a new job
    rpc createJob (CreateJobRequest) returns (CreateJobResponse);

    // Upload an asset for the job.
    // If it returns an UploadAssetResponse with 'assetSelected=true', the asset was already known and has been
    // selected and the steams are closed.
    // When 'assetSelected=false' subsequent UploadAssetRequests with the 'chunk' field set should be sent until
    // all data has been sent. When all data has been received, a final response is sent with 'assetSelected=true'
    rpc uploadAsset (stream UploadAssetRequest) returns (stream UploadAssetResponse);

    // Start processing the assets in the job.
    // All required assets for the job type must be selected and uploaded.
    // If successful, returns an empty response, otherwise returns an exception.
    rpc startJob (StartJobRequest) returns (StartJobResponse);

    // Get status of a single job
    rpc jobStatus (JobStatusRequest) returns (JobStatusResponse);

    // Download asset from a job
    rpc downloadAsset (stream DownloadAssetRequest) returns (stream DownloadAssetResponse);

    // End the job. If processing has not finished, this will cancel any further processing
    // Assets will be deleted after this call
    rpc endJob (EndJobRequest) returns (EndJobResponse);

    // Stream version of 'jobStatus'.
    // Continuously pushes status changes for any active job for the client.
    // If no jobs are active, the stream is closed.
    rpc multiJobStatusStream (google.protobuf.Empty) returns (stream JobStatusStream);
};
class momotor.rpc.proto.client_grpc.ClientBase
abstract async createJob(stream)
Return type

None

abstract async uploadAsset(stream)
Return type

None

abstract async startJob(stream)
Return type

None

abstract async jobStatus(stream)
Return type

None

abstract async downloadAsset(stream)
Return type

None

abstract async endJob(stream)
Return type

None

abstract async multiJobStatusStream(stream)
Return type

None

class momotor.rpc.proto.client_grpc.ClientStub(channel)

Generated protocol buffer code.

Exception

syntax = "proto3";

package momotor.rpc.proto;

enum ExceptionType {
    INVALID_EXCEPTION = 0;
    FORMAT = 1;
    AUTH = 2;
    JOB = 3;
    ASSET = 4;
    ASSET_NOT_FOUND = 5;
}

message Exception {
    ExceptionType type = 1;
    string text = 2;
}

Generated protocol buffer code.

class momotor.rpc.proto.exception_pb2.Exception
DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

text

Field momotor.rpc.proto.Exception.text

type

Field momotor.rpc.proto.Exception.type

Job

syntax = "proto3";

import "google/protobuf/duration.proto";
import "momotor/rpc/proto/exception.proto";
import "momotor/rpc/proto/priority.proto";
import "momotor/rpc/proto/resource.proto";

package momotor.rpc.proto;

enum JobType {
    NO_JOB_TYPE = 0;
    TEST_RECIPE = 1;
    VERIFY_PRODUCT = 2;
}

enum JobState {
    NO_JOB_STATE = 0;
    INITIALIZING = 1;
    QUEUED = 2;
    STARTED = 3;
    FINISHED = 4;
    CANCELLED = 5;
    FAILED = 6;
    reserved 100 to max;  // Reserved for internal use by clients
}

message JobStatus {
    JobState state = 1;  // required
    google.protobuf.Duration time = 2;  // optional -- expected time remaining until completion
    uint32 tasks = 3; // optional -- total number of tasks for this job
    uint32 tasksActive = 4; // optional -- number of currently active tasks
    uint32 tasksFinished = 5; // optional -- number of finished tasks
    string failure = 6;  // optional
    Priority priority = 7;  // optional
}

message CreateJobRequest {
    JobType type = 1;  // required
    bool noCache = 2;  // if set, do not cache assets. optional. Whether caching actually happens is up to the server
    repeated Resource resource = 3;  // optional
    Priority priority = 4;  // optional
};

message CreateJobResponse {
    string jobId = 1;  // required
    Exception exception = 1000; // optional
}

message StartJobRequest {
    string jobId = 1;  // required
}

message StartJobResponse {
    Exception exception = 1000; // optional
}

message JobStatusRequest {
    string jobId = 1;  // required
}

message JobStatusResponse {
    JobStatus status = 1;
    Exception exception = 1000; // optional
}

message EndJobRequest {
    string jobId = 1;  // required
}

message EndJobResponse {
    Exception exception = 1000; // optional
}

message JobStatusStream {
    string jobId = 1;  // required
    JobStatus status = 2;  // required
    Exception exception = 1000; // optional
}

Generated protocol buffer code.

class momotor.rpc.proto.job_pb2.JobStatus
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

failure

Field momotor.rpc.proto.JobStatus.failure

priority

Field momotor.rpc.proto.JobStatus.priority

state

Field momotor.rpc.proto.JobStatus.state

tasks

Field momotor.rpc.proto.JobStatus.tasks

tasksActive

Field momotor.rpc.proto.JobStatus.tasksActive

tasksFinished

Field momotor.rpc.proto.JobStatus.tasksFinished

time

Field momotor.rpc.proto.JobStatus.time

class momotor.rpc.proto.job_pb2.CreateJobRequest
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

noCache

Field momotor.rpc.proto.CreateJobRequest.noCache

priority

Field momotor.rpc.proto.CreateJobRequest.priority

resource

Field momotor.rpc.proto.CreateJobRequest.resource

type

Field momotor.rpc.proto.CreateJobRequest.type

class momotor.rpc.proto.job_pb2.CreateJobResponse
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

exception

Field momotor.rpc.proto.CreateJobResponse.exception

jobId

Field momotor.rpc.proto.CreateJobResponse.jobId

class momotor.rpc.proto.job_pb2.StartJobRequest
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

jobId

Field momotor.rpc.proto.StartJobRequest.jobId

class momotor.rpc.proto.job_pb2.StartJobResponse
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

exception

Field momotor.rpc.proto.StartJobResponse.exception

class momotor.rpc.proto.job_pb2.JobStatusRequest
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

jobId

Field momotor.rpc.proto.JobStatusRequest.jobId

class momotor.rpc.proto.job_pb2.JobStatusResponse
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

exception

Field momotor.rpc.proto.JobStatusResponse.exception

status

Field momotor.rpc.proto.JobStatusResponse.status

class momotor.rpc.proto.job_pb2.EndJobRequest
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

jobId

Field momotor.rpc.proto.EndJobRequest.jobId

class momotor.rpc.proto.job_pb2.EndJobResponse
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

exception

Field momotor.rpc.proto.EndJobResponse.exception

class momotor.rpc.proto.job_pb2.JobStatusStream
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

exception

Field momotor.rpc.proto.JobStatusStream.exception

jobId

Field momotor.rpc.proto.JobStatusStream.jobId

status

Field momotor.rpc.proto.JobStatusStream.status

Priority

syntax = "proto3";

package momotor.rpc.proto;

enum Priority {
    NORMAL = 0;
    LOWEST = -2;
    LOW = -1;
    HIGH = 1;
    HIGHEST = 2;
}

Generated protocol buffer code.

Resource

syntax = "proto3";

message Resource {
    string name = 1;  // required
    string value = 2;  // required
}

Generated protocol buffer code.

class momotor.rpc.proto.resource_pb2.Resource
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

name

Field Resource.name

value

Field Resource.value

Shared

syntax = "proto3";

import "momotor/rpc/proto/exception.proto";

package momotor.rpc.proto;

//enum SharedValueAction {
//    NO_ACTION = 0;
//    SET_VALUE_ACTION = 1;
//    GET_VALUE_ACTION = 2;
//    DELETE_VALUE_ACTION = 3;
//}
//
//message SharedValueRequest {
//    SharedValueAction action = 1;  // required
//    string key = 2; // required
//    string value = 3; // optional. If not supplied for set, it will update the last-set timestamp of the current value
//}
//
//message SharedValueResponse {
//    string value = 1;
//    int64 age = 2;  // The age of the value, how long ago was it last set
//    Exception exception = 1000; // optional
//}

message SharedLockRequest {
    bool lock = 1;
    string key = 2;  // required on first request on the stream, optional on subsequent requests, must not change
    bool exclusive = 3; // optional, 'true' if not provided (for backwards compatibility)
}

message SharedLockResponse {
    bool locked = 1;
    Exception exception = 1000; // optional
}

Generated protocol buffer code.

class momotor.rpc.proto.shared_pb2.SharedLockRequest
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

exclusive

Field momotor.rpc.proto.SharedLockRequest.exclusive

key

Field momotor.rpc.proto.SharedLockRequest.key

lock

Field momotor.rpc.proto.SharedLockRequest.lock

class momotor.rpc.proto.shared_pb2.SharedLockResponse
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

exception

Field momotor.rpc.proto.SharedLockResponse.exception

locked

Field momotor.rpc.proto.SharedLockResponse.locked

Task

syntax = "proto3";

import "momotor/rpc/proto/exception.proto";
import "momotor/rpc/proto/priority.proto";
import "momotor/rpc/proto/resource.proto";
import "momotor/rpc/proto/tool.proto";

package momotor.rpc.proto;

message TaskId {
    string jobId = 1;  // required
    string stepId = 2;  // required
    string testId = 3;  // optional
    repeated uint32 taskNumber = 4;  // optional
}

message GetTaskRequest {
    string version = 1;
    // repeated string capability = 2;  // replaced by resource
    repeated Resource resource = 3;  // optional: provided resources
    repeated ToolSet tool = 4;  // provided tools
}

message GetTaskResponse {
    TaskId taskId = 1; // required
    repeated Resource resource = 2; // optional: requested resources
    Priority priority = 3;  // optional
    Exception exception = 1000; // optional
}

Generated protocol buffer code.

class momotor.rpc.proto.task_pb2.TaskId
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

jobId

Field momotor.rpc.proto.TaskId.jobId

stepId

Field momotor.rpc.proto.TaskId.stepId

taskNumber

Field momotor.rpc.proto.TaskId.taskNumber

testId

Field momotor.rpc.proto.TaskId.testId

class momotor.rpc.proto.task_pb2.GetTaskRequest
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

resource

Field momotor.rpc.proto.GetTaskRequest.resource

tool

Field momotor.rpc.proto.GetTaskRequest.tool

version

Field momotor.rpc.proto.GetTaskRequest.version

class momotor.rpc.proto.task_pb2.GetTaskResponse
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

exception

Field momotor.rpc.proto.GetTaskResponse.exception

priority

Field momotor.rpc.proto.GetTaskResponse.priority

resource

Field momotor.rpc.proto.GetTaskResponse.resource

taskId

Field momotor.rpc.proto.GetTaskResponse.taskId

Worker

syntax = "proto3";

import "momotor/rpc/proto/asset.proto";
import "momotor/rpc/proto/exception.proto";
import "momotor/rpc/proto/shared.proto";
import "momotor/rpc/proto/task.proto";

package momotor.rpc.proto;

message UpdateTaskStatusRequest {
    TaskId taskId = 1;  // required
    double progress = 2;  // optional
}

message UpdateTaskStatusResponse {
    Exception exception = 1000; // optional
}

// Service for Momotor workers to connect to the broker
service Worker {
    // Register a worker and get a job. Will block until a job is available
    // Worker can cancel registration and re-register to change capabilities
    rpc getTask (GetTaskRequest) returns (GetTaskResponse);

    // Download asset for a job
    rpc downloadAsset (stream DownloadAssetRequest) returns (stream DownloadAssetResponse);

    // Upload an asset for the job.
    // If it returns an UploadAssetResponse with 'assetSelected=true', the asset was already known and has been
    // selected and the steams are closed.
    // When 'assetSelected=false' subsequent UploadAssetRequests with the 'chunk' field set should be sent until
    // all data has been sent. When all data has been received, a final response is sent with 'assetSelected=true'
    rpc uploadAsset (stream UploadAssetRequest) returns (stream UploadAssetResponse);

    // Update the status of the task. An exception response should immediately kill the current job
    // The worker should send an update regularly (every few seconds)
    rpc updateTaskStatus (UpdateTaskStatusRequest) returns (UpdateTaskStatusResponse);

    // Shared values
    // rpc sharedValue (SharedValueRequest) returns (SharedValueResponse);

    // Shared locks
    // SharedLockRequest messages are sent in a stream, stream continues with `lock` True, ends with `lock` False
    // `key` may not change in between requests on the same stream
    // If `lock` is false on first request, the response `locked` value indicates whether the lock is currently held by
    // another worker
    // If `lock` is true on first request, lock is acquired before response will be sent. response `locked` will be true
    // If `lock` is true on subsequent requests, nothing changes
    // `lock` should be false on final request and the lock is released and response `locked` indicates current lock
    // status which could be true, if another worker immediately took over the lock
    // If the stream cancels, lock is release as well
    rpc sharedLock (stream SharedLockRequest) returns (stream SharedLockResponse);
}
class momotor.rpc.proto.worker_grpc.WorkerBase
abstract async getTask(stream)
Return type

None

abstract async downloadAsset(stream)
Return type

None

abstract async uploadAsset(stream)
Return type

None

abstract async updateTaskStatus(stream)
Return type

None

abstract async sharedLock(stream)
Return type

None

class momotor.rpc.proto.worker_grpc.WorkerStub(channel)

Generated protocol buffer code.

class momotor.rpc.proto.worker_pb2.UpdateTaskStatusRequest
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

progress

Field momotor.rpc.proto.UpdateTaskStatusRequest.progress

taskId

Field momotor.rpc.proto.UpdateTaskStatusRequest.taskId

class momotor.rpc.proto.worker_pb2.UpdateTaskStatusResponse
ByteSize()

Returns the size of the message in bytes.

Clear()

Clears the message.

ClearExtension()

Clears a message field.

ClearField()

Clears a message field.

CopyFrom()

Copies a protocol message into the current message.

DESCRIPTOR = <google.protobuf.pyext._message.MessageDescriptor object>

The google.protobuf.descriptor.Descriptor for this message type.

DiscardUnknownFields()

Discards the unknown fields.

Extensions

Extension dict

FindInitializationErrors()

Finds unset required fields.

FromString()

Creates new method instance from given serialized data.

HasExtension()

Checks if a message field is set.

HasField()

Checks if a message field is set.

IsInitialized()

Checks if all required fields of a protocol message are set.

ListFields()

Lists all set fields of a message.

MergeFrom()

Merges a protocol message into the current message.

MergeFromString()

Merges a serialized message into the current message.

ParseFromString()

Parses a serialized message into the current message.

RegisterExtension()

Registers an extension with the current message.

SerializePartialToString()

Serializes the message to a string, even if it isn’t initialized.

SerializeToString()

Serializes the message to a string, only for initialized messages.

SetInParent()

Sets the has bit of the given field in its parent message.

UnknownFields()

Parse unknown field set

WhichOneof()

Returns the name of the field set inside a oneof, or None if no field is set.

exception

Field momotor.rpc.proto.UpdateTaskStatusResponse.exception