summaryrefslogtreecommitdiffhomepage
path: root/types/logid
AgeCommit message (Collapse)AuthorFilesLines
2024-06-17types/logid: add Add method (#12478)Joe Tsai2-0/+128
The Add method derives a new ID by adding a signed integer to the ID, treating it as an unsigned 256-bit big-endian integer. We also add Less and Compare methods to PrivateID to provide feature parity with existing methods on PublicID. Updates tailscale/corp#11038 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2024-02-08all: use new AppendEncode methods available in Go 1.22 (#11079)Joe Tsai1-12/+4
Updates #cleanup Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2023-09-01all: implement AppendText alongside MarshalText (#9207)Joe Tsai1-8/+18
This eventually allows encoding packages that may respect the proposed encoding.TextAppender interface. The performance gains from this is between 10-30%. Updates tailscale/corp#14379 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2023-08-17all: use Go 1.21 slices, maps instead of x/exp/{slices,maps}Brad Fitzpatrick1-2/+1
Updates #8419 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-07-28types/logid: add a Compare methodDavid Anderson1-1/+5
Updates #cleanup Signed-off-by: David Anderson <danderson@tailscale.com>
2023-03-02types/logid: simplify implementation (#7415)Joe Tsai2-113/+69
Share the same underlying implementation for both PrivateID and PublicID. For the shared methods, declare them in the same order. Only keep documentation on methods without obvious meaning. Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2023-02-28types/logid: remove MustParsePublicID (#7405)Joe Tsai1-10/+0
Ever since the introduction of the "must" package, most MustXXX functions are no longer necessary. Remove this as it is no longer depended upon from within this repository and by the internal private repository. Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2023-02-28all: replace logtail.{Public,Private}ID with logid.{Public,Private}ID (#7404)Joe Tsai1-5/+5
The log ID types were moved to a separate package so that code that only depend on log ID types do not need to link in the logic for the logtail client itself. Not all code need the logtail client. Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2023-01-27all: update copyright and license headersWill Norris2-6/+4
This updates all source files to use a new standard header for copyright and license declaration. Notably, copyright no longer includes a date, and we now use the standard SPDX-License-Identifier header. This commit was done almost entirely mechanically with perl, and then some minimal manual fixes. Updates #6865 Signed-off-by: Will Norris <will@tailscale.com>
2022-11-28types/logid: move logtail ID types here (#6336)Joe Tsai2-0/+250
Many packages reference the logtail ID types, but unfortunately pull in the transitive dependencies of logtail. Fix this problem by putting the log ID types in its own package with minimal dependencies. Signed-off-by: Joe Tsai <joetsai@digital-static.net>