gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/sentry/control/control.proto (about) 1 // Copyright 2021 The gVisor Authors. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 syntax = "proto3"; 16 17 package gvisor; 18 19 import "google/protobuf/timestamp.proto"; 20 21 // ControlConfig configures the permission of controls. 22 message ControlConfig { 23 // Names for individual control URPC service objects. 24 // Any new service object that should be given conditional access should be 25 // named here and conditionally added based on presence in allowed_controls. 26 enum Endpoint { 27 UNKNOWN = 0; 28 EVENTS = 1; 29 FS = 2; 30 LIFECYCLE = 3; 31 LOGGING = 4; 32 PROFILE = 5; 33 USAGE = 6; 34 PROC = 7; 35 STATE = 8; 36 DEBUG = 9; 37 CGROUPS = 10; 38 } 39 40 // allowed_controls represents which endpoints may be registered to the 41 // server. 42 repeated Endpoint allowed_controls = 1; 43 } 44 45 // ContainerStartedEvent is emitted when a container starts. 46 // It also keeps a track of the time elapsed when a container 47 // start request is received and the container actually starts. 48 message ContainerStartedEvent { 49 bool started = 1; 50 string container_id = 2; 51 google.protobuf.Timestamp request_received = 3; 52 google.protobuf.Timestamp request_completed = 4; 53 } 54 55 // ContainerExitEvent is emitted when a container's init task exits. Duplicate 56 // exit events may be emitted for the same container. 57 message ContainerExitEvent { 58 string container_id = 1; 59 uint32 exit_status = 2; 60 }