Welcome to mirror list, hosted at ThFree Co, Russian Federation.

log.proto « proto - gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1df859a7e0eb191e1382379e3075961b46289d98 (plain)
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
syntax = "proto3";

package gitaly;

import "shared.proto";

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

// LogEntry is a single entry in a partition's write-ahead log.
//
// Schema for :
// - `partition/<partition_id>/log/entry/<log_index>`.
message LogEntry {
  // ReferenceTransaction models a single reference transaction.
  message ReferenceTransaction {
    // Change models a single reference change.
    message Change {
      // reference_name is the fully qualified name of the reference
      // to update.
      bytes reference_name = 1;
      // new_oid is the new oid to point the reference to. Deletions
      // are denoted as the SHA1 or SHA256 zero OID depending on the
      // hash type used in the repository.
      bytes new_oid = 2;
    }

    // changes are the reference changes performed in this reference transaction.
    repeated Change changes = 1;
  }

  // DefaultBranchUpdate models a default branch update.
  message DefaultBranchUpdate {
    // reference_name is the fully qualified name of the reference
    // to update the default branch to.
    bytes reference_name = 1;
  }

  // CustomHooksUpdate models an update to the custom hooks.
  message CustomHooksUpdate {
    // custom_hooks_tar is a TAR that contains the custom hooks in
    // `custom_hooks` directory. The contents of the directory are
    // unpacked as the custom hooks.
    bytes custom_hooks_tar = 1;
  }

  // RepositoryCreation models a repository creation.
  message RepositoryCreation {
    // object_format defines the object format to use for the repository.
    ObjectFormat object_format = 1;
  }

  // RepositoryDeletion models a repository deletion.
  message RepositoryDeletion {
  }

  // AlternateUpdate models an update to the 'objects/info/alternates' file.
  message AlternateUpdate {
    // path is the path to set in the alternates file. If the path is empty,
    // the alternate file is removed.
    string path = 1;
  }

  // relative_path is the relative path of the repository the changes in the
  // log entry are targeting.
  string relative_path = 1;
  // reference_transactions contains the reference transactions this
  // entry records. The logged reference updates have already passed
  // through verification and are applied without any further checks.
  // The reference transactions are applied in order.
  repeated ReferenceTransaction reference_transactions = 2;
  // default_branch_update contains the information pertaining to updating
  // the default branch of the repo.
  DefaultBranchUpdate default_branch_update = 3;
  // custom_hooks_update contains the custom hooks to set in the repository.
  CustomHooksUpdate custom_hooks_update = 4;
  // pack_prefix contains the prefix (`pack-<digest>`) of the pack and its index.
  // If pack_prefix is empty, the log entry has no associated pack.
  string pack_prefix = 5;
  // repository_deletion, when set, indicates this log entry deletes the repository.
  RepositoryDeletion repository_deletion = 6;
  // repository_creation is set if this log entry creates a repository.
  RepositoryCreation repository_creation = 7;
  // alternate_update records a change to the repository's 'objects/info/alternates' file.
  AlternateUpdate alternate_update = 8;
}

// LSN serializes a log sequence number. It's used for storing a partition's
// applied LSN in the database.
//
// Schema for:
// - `partition/<partition_id>/applied_lsn`
message LSN {
  // value is an LSN pointing to a position in the log.
  uint64 value = 1;
}