diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-04-02 14:31:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-02 14:31:09 +0200 |
commit | 203e464f93e2ca7054b58e2aabc13afa6dec4a8c (patch) | |
tree | f7427403d0fa4938fc519a4f0a68251e49c0ee82 /vendor/github.com/godbus/dbus/v5/sequence.go | |
parent | 23ee8b1df1f70aaad4fc4bc9c0c6b17f7aae5c8a (diff) | |
parent | 5a7a1a1673c3735033a7d27d26b96c8d3eb9a14c (diff) | |
download | podman-203e464f93e2ca7054b58e2aabc13afa6dec4a8c.tar.gz podman-203e464f93e2ca7054b58e2aabc13afa6dec4a8c.tar.bz2 podman-203e464f93e2ca7054b58e2aabc13afa6dec4a8c.zip |
Merge pull request #9925 from containers/dependabot/go_modules/github.com/coreos/go-systemd/v22-22.3.1
Bump github.com/coreos/go-systemd/v22 from 22.3.0 to 22.3.1
Diffstat (limited to 'vendor/github.com/godbus/dbus/v5/sequence.go')
-rw-r--r-- | vendor/github.com/godbus/dbus/v5/sequence.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/github.com/godbus/dbus/v5/sequence.go b/vendor/github.com/godbus/dbus/v5/sequence.go new file mode 100644 index 000000000..89435d393 --- /dev/null +++ b/vendor/github.com/godbus/dbus/v5/sequence.go @@ -0,0 +1,24 @@ +package dbus + +// Sequence represents the value of a monotonically increasing counter. +type Sequence uint64 + +const ( + // NoSequence indicates the absence of a sequence value. + NoSequence Sequence = 0 +) + +// sequenceGenerator represents a monotonically increasing counter. +type sequenceGenerator struct { + nextSequence Sequence +} + +func (generator *sequenceGenerator) next() Sequence { + result := generator.nextSequence + generator.nextSequence++ + return result +} + +func newSequenceGenerator() *sequenceGenerator { + return &sequenceGenerator{nextSequence: 1} +} |