File: objectpool.proto

package info (click to toggle)
golang-gitaly-proto 1.37.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 372 kB
  • sloc: ruby: 216; makefile: 93
file content (102 lines) | stat: -rw-r--r-- 2,886 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
syntax = "proto3";

package gitaly;

option go_package = "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb";

import "shared.proto";

service ObjectPoolService {
  rpc CreateObjectPool(CreateObjectPoolRequest) returns (CreateObjectPoolResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1.1"
    };
  }
  rpc DeleteObjectPool(DeleteObjectPoolRequest) returns (DeleteObjectPoolResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1.1"
    };
  }

  // Repositories are assumed to be stored on the same disk
  rpc LinkRepositoryToObjectPool(LinkRepositoryToObjectPoolRequest) returns (LinkRepositoryToObjectPoolResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1.1"
    };
  }
  rpc UnlinkRepositoryFromObjectPool(UnlinkRepositoryFromObjectPoolRequest) returns (UnlinkRepositoryFromObjectPoolResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }

  rpc ReduplicateRepository(ReduplicateRepositoryRequest) returns (ReduplicateRepositoryResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc DisconnectGitAlternates(DisconnectGitAlternatesRequest) returns (DisconnectGitAlternatesResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc FetchIntoObjectPool(FetchIntoObjectPoolRequest) returns (FetchIntoObjectPoolResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
}

// Creates an object pool from the repository. The client is responsible for
// joining this pool later with this repository.
message CreateObjectPoolRequest {
  ObjectPool object_pool = 1;
  Repository origin = 2;
}
message CreateObjectPoolResponse {}

// Removes the directory from disk, caller is responsible for leaving the object
// pool before calling this RPC
message DeleteObjectPoolRequest {
  ObjectPool object_pool = 1;
}
message DeleteObjectPoolResponse {}

message LinkRepositoryToObjectPoolRequest {
  ObjectPool object_pool = 1;
  Repository repository = 2;
}
message LinkRepositoryToObjectPoolResponse {}

// This RPC doesn't require the ObjectPool as it will remove the alternates file
// from the pool participant. The caller is responsible no data loss occurs.
message UnlinkRepositoryFromObjectPoolRequest {
  Repository repository = 1;
  ObjectPool object_pool = 2;
}
message UnlinkRepositoryFromObjectPoolResponse {}

message ReduplicateRepositoryRequest {
  Repository repository = 1;
}
message ReduplicateRepositoryResponse {}

message DisconnectGitAlternatesRequest {
  Repository repository = 1;
}

message DisconnectGitAlternatesResponse {}

message FetchIntoObjectPoolRequest {
  Repository origin = 1;
  ObjectPool object_pool = 2;
  bool repack = 3;
}
message FetchIntoObjectPoolResponse {}