-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/7.x' into mergify/bp/7.x/pr-187
- Loading branch information
Showing
11 changed files
with
58 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,11 @@ Third party libraries used by the Elastic Beats project: | |
|
||
-------------------------------------------------------------------------------- | ||
Dependency : github.com/aleksmaus/generate | ||
Version: v0.0.0-20201213151810-c5bc68a6a42f | ||
Version: v0.0.0-20210326194607-c630e07a2742 | ||
Licence type (autodetected): MIT | ||
-------------------------------------------------------------------------------- | ||
|
||
Contents of probable licence file $GOMODCACHE/github.com/aleksmaus/[email protected]20201213151810-c5bc68a6a42f/LICENSE.txt: | ||
Contents of probable licence file $GOMODCACHE/github.com/aleksmaus/[email protected]20210326194607-c630e07a2742/LICENSE.txt: | ||
|
||
MIT License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
// or more contributor license agreements. Licensed under the Elastic License; | ||
// you may not use this file except in compliance with the Elastic License. | ||
|
||
package sqn | ||
|
||
import ( | ||
"fmt" | ||
"strings" | ||
) | ||
|
||
const UndefinedSeqNo = -1 | ||
|
||
// Abstracts the array of document seq numbers | ||
type SeqNo []int64 | ||
|
||
func (s SeqNo) String() string { | ||
if len(s) == 0 { | ||
return "" | ||
} | ||
return strings.Join(strings.Fields(strings.Trim(fmt.Sprint([]int64(s)), "[]")), ",") | ||
} | ||
|
||
func (s SeqNo) IsSet() bool { | ||
return len(s) > 0 && s[0] >= 0 | ||
} | ||
|
||
func (s SeqNo) Get(idx int) int64 { | ||
if idx < len(s) { | ||
return s[idx] | ||
} | ||
return UndefinedSeqNo | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters