This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

core / spindle / agentproto / spindle / agent / v1 / agent.proto
2.4 kB 110 lines
1syntax = "proto3"; 2 3package spindle.agent.v1; 4 5import "buf/validate/validate.proto"; 6 7option go_package = "tangled.org/core/spindle/agentproto/gen;agentv1"; 8 9message Hello { 10 uint32 protocol_version = 1; 11 string agent_version = 2; 12 string boot_id = 3; 13 string nix_version = 4; 14} 15 16message Init { 17 string job_id = 1; 18 repeated string cache_trusted_public_keys = 2; 19 uint32 cache_read_proxy_port = 3; 20 uint32 cache_upload_proxy_port = 4; 21 uint32 dns_proxy_port = 5; 22} 23 24message ExecStart { 25 repeated string argv = 1; 26 repeated string env = 2; 27 string cwd = 3; 28 string user = 4; 29 uint32 timeout_seconds = 5; 30} 31 32message ExecStdout { 33 string data = 1; 34} 35 36message ExecStderr { 37 string data = 1; 38} 39 40message ExecExit { 41 int32 exit_code = 1; 42 string error = 2; 43 // set when the guest killed the step on its own timeout timer, so the host 44 // can classify it as a timeout rather than inferring failure from exit_code. 45 bool timed_out = 3; 46} 47 48message ActivateConfig { 49 string config_key = 1; 50 string base_config_hash = 2; 51 string user_config = 3; 52 string toplevel = 4; 53 uint32 timeout_seconds = 5; 54} 55 56message ActivateConfigResult { 57 string config_key = 1; 58 string toplevel = 2; 59 string error = 3; 60} 61 62message BuiltPaths { 63 repeated string paths = 1; 64 string reason = 2; 65} 66 67message CacheDrain { 68 uint32 timeout_seconds = 1; 69} 70 71message CacheDrainResult { 72 string error = 1; 73 uint32 cache_queued = 2; 74 uint32 cache_active = 3; 75 uint32 cache_uploaded = 4; 76 uint32 cache_failed = 5; 77} 78 79message Poweroff {} 80 81message PoweroffResult { 82 string error = 1; 83} 84 85message Message { 86 option (buf.validate.message).oneof = { 87 fields: [ 88 "hello", "init", "exec_start", "exec_stdout", "exec_stderr", "exec_exit", 89 "activate_config", "activate_config_result", "built_paths", "cache_drain", 90 "cache_drain_result", "poweroff", "poweroff_result" 91 ], 92 required: true 93 }; 94 95 string id = 1 [(buf.validate.field).string.min_len = 1]; 96 97 Hello hello = 2; 98 Init init = 3; 99 ExecStart exec_start = 4; 100 ExecStdout exec_stdout = 5; 101 ExecStderr exec_stderr = 6; 102 ExecExit exec_exit = 7; 103 ActivateConfig activate_config = 8; 104 ActivateConfigResult activate_config_result = 9; 105 BuiltPaths built_paths = 10; 106 CacheDrain cache_drain = 11; 107 CacheDrainResult cache_drain_result = 12; 108 Poweroff poweroff = 13; 109 PoweroffResult poweroff_result = 14; 110}