Sha256: 13e8f30baae43f39825beed06e83d2ce002bb55520ffb17d68d58048e7f9ca8b

Contents?: true

Size: 1.51 KB

Versions: 11

Compression:

Stored size: 1.51 KB

Contents

syntax = "proto3";
package v3lockpb;

import "annotations.proto";
import "rpc.proto";
import "gogo.proto";

option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;

service Lock {
  // Lock acquires a distributed shared lock on a given named lock.
  rpc Lock(LockRequest) returns (LockResponse) {
      option (google.api.http) = {
        post: "/v3alpha/lock/lock"
        body: "*"
    };
  }

  // Unlock takes a key returned by Lock and releases the hold on lock.
  rpc Unlock(UnlockRequest) returns (UnlockResponse) {
      option (google.api.http) = {
        post: "/v3alpha/lock/unlock"
        body: "*"
    };
  }
}

message LockRequest {
  // name is the identifier for the distributed shared lock to be acquired.
  bytes name = 1;
  // lease is the ID of the lease that will be attached to ownership of the
  // lock. If the lease expires or is revoked and currently holds the lock,
  // the lock is automatically released. Calls to Lock with the same lease will
  // be treated as a single acquisition; locking twice with the same lease is a
  // no-op.
  int64 lease = 2;
}

message LockResponse {
  etcdserverpb.ResponseHeader header = 1;
  // key is a key that will exist on etcd for the duration that the Lock caller
  // owns the lock. Users should not modify this key or the lock may exhibit
  // undefined behavior.
  bytes key = 2;
}

message UnlockRequest {
  // key is the lock ownership key granted by Lock.
  bytes key = 1;
}

message UnlockResponse {
  etcdserverpb.ResponseHeader header = 1;
}

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/etcdv3-0.11.5/lib/etcdv3/protos/v3lock.proto
etcdv3-0.11.6 lib/etcdv3/protos/v3lock.proto
rubypitaya-3.12.4 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/etcdv3-0.11.5/lib/etcdv3/protos/v3lock.proto
rubypitaya-3.12.3 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/etcdv3-0.11.5/lib/etcdv3/protos/v3lock.proto
rubypitaya-3.12.2 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/etcdv3-0.11.5/lib/etcdv3/protos/v3lock.proto
etcdv3-0.11.5 lib/etcdv3/protos/v3lock.proto
etcdv3-0.11.4 lib/etcdv3/protos/v3lock.proto
etcdv3-0.11.3 lib/etcdv3/protos/v3lock.proto
etcdv3-0.10.2 lib/etcdv3/protos/v3lock.proto
etcdv3-0.10.1 lib/etcdv3/protos/v3lock.proto
etcdv3-0.9.0 lib/etcdv3/protos/v3lock.proto