syntax = "proto3"; package api; option go_package = "github.com/psviderski/uncloud/internal/machine/api/pb"; // Vendored at internal/machine/api/vendor/google/rpc/status.proto. import "google/rpc/status.proto"; import "google/protobuf/timestamp.proto"; // Common metadata message nested in all reply message types, injected by the gRPC proxy to provide information // about the machine that responded to the request. message Metadata { // ID of the machine the response came from. string machine_id = 4; // Name of the machine the response came from. string machine_name = 5; // Address of the machine the response came from. string machine_addr = 1; // error is set if the request to upstream failed. The rest of the response is undefined. string error = 2; // error as a gRPC Status message. google.rpc.Status status = 3; } // A helper message for marshalling the metadata field and injecting it into the response by the gRPC proxy. message Empty { Metadata metadata = 1; } // EmptyResponse is a response message to be returned by the gRPC proxy when a request to the upstream failed. // The nested Empty.Metadata message should contain an error. message EmptyResponse { repeated Empty messages = 1; } message IP { bytes ip = 1; } message IPPort { IP ip = 1; uint32 port = 2; } message IPPrefix { IP ip = 1; uint32 bits = 2; } message LogsRequest { string id = 1; // Options for logs retrieval. bool follow = 2; int32 tail = 3; // -1 means all string since = 4; // https://www.rfc-editor.org/rfc/rfc3339.html timestamp or Go duration string string until = 5; // https://www.rfc-editor.org/rfc/rfc3339.html timestamp or Go duration string } message LogEntry { enum StreamType { UNKNOWN = 0; STDOUT = 1; STDERR = 2; HEARTBEAT = 3; } StreamType stream = 1; google.protobuf.Timestamp timestamp = 2; // Log line content. Empty for heartbeat entries. bytes message = 3; }