Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,374 changes: 265 additions & 1,109 deletions api/authpb/auth.pb.go

Large diffs are not rendered by default.

404 changes: 95 additions & 309 deletions api/etcdserverpb/etcdserver.pb.go

Large diffs are not rendered by default.

351 changes: 170 additions & 181 deletions api/etcdserverpb/gw/rpc.pb.gw.go

Large diffs are not rendered by default.

3,102 changes: 402 additions & 2,700 deletions api/etcdserverpb/raft_internal.pb.go

Large diffs are not rendered by default.

27,108 changes: 4,690 additions & 22,418 deletions api/etcdserverpb/rpc.pb.go

Large diffs are not rendered by default.

1,696 changes: 289 additions & 1,407 deletions api/membershippb/membership.pb.go

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions api/mvccpb/extension.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2026 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package mvccpb

// IsCreate returns true if the event tells that the key is newly created.
func (e *Event) IsCreate() bool {
return e.GetType() == PUT && e.GetKv().GetCreateRevision() == e.GetKv().GetModRevision()
}

// IsModify returns true if the event tells that a new value is put on existing key.
func (e *Event) IsModify() bool {
return e.GetType() == PUT && e.GetKv().GetCreateRevision() != e.GetKv().GetModRevision()
}
Loading