/*
	Copyright The containerd Authors.

	Licensed under the Apache License, Version 2.0 (the "License");
	you may not use this file except in compliance with the License.
	You may obtain a copy of the License at

		http://www.apache.org/licenses/LICENSE-2.0

	Unless required by applicable law or agreed to in writing, software
	distributed under the License is distributed on an "AS IS" BASIS,
	WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	See the License for the specific language governing permissions and
	limitations under the License.
*/

syntax = "proto3";

package containerd.v1.types;

import "google/protobuf/timestamp.proto";
import "google/protobuf/any.proto";

option go_package = "github.com/containerd/containerd/api/types/task";

enum Status {
	UNKNOWN = 0;
	CREATED = 1;
	RUNNING = 2;
	STOPPED = 3;
	PAUSED = 4;
	PAUSING = 5;
}

message Process {
	string container_id = 1;
	string id = 2;
	uint32 pid = 3;
	Status status = 4;
	string stdin = 5;
	string stdout = 6;
	string stderr = 7;
	bool terminal = 8;
	uint32 exit_status = 9;
	google.protobuf.Timestamp exited_at = 10;
}

message ProcessInfo {
	// PID is the process ID.
	uint32 pid = 1;
	// Info contains additional process information.
	//
	// Info varies by platform.
	google.protobuf.Any info = 2;
}
