Skip to content

Commit 3bc0aa3

Browse files
Rename PSC Client ID to PSC Connection ID
This is how the documentation and GCP UI/CLI call the field. Not sure where did we get the _client_ from.
1 parent 8a2ef0b commit 3bc0aa3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tlvparse/gcp.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ const (
1515
// a bool indicating one was found.
1616
func ExtractPSCConnectionID(tlvs []proxyproto.TLV) (uint64, bool) {
1717
for _, tlv := range tlvs {
18-
if linkID, err := pscClientID(tlv); err == nil {
18+
if linkID, err := pscConnectionID(tlv); err == nil {
1919
return linkID, true
2020
}
2121
}
2222
return 0, false
2323
}
2424

25-
// pscClientID returns the ID of a GCP PSC extension TLV or errors with ErrIncompatibleTLV or
25+
// pscConnectionID returns the ID of a GCP PSC extension TLV or errors with ErrIncompatibleTLV or
2626
// ErrMalformedTLV if it's the wrong TLV type or is malformed.
2727
//
2828
// Field Length (bytes) Description
@@ -34,7 +34,7 @@ func ExtractPSCConnectionID(tlvs []proxyproto.TLV) (uint64, bool) {
3434
// will be decoded as 18446744072646845442.
3535
//
3636
// See https://cloud.google.com/vpc/docs/configure-private-service-connect-producer
37-
func pscClientID(t proxyproto.TLV) (uint64, error) {
37+
func pscConnectionID(t proxyproto.TLV) (uint64, error) {
3838
if !isPSCClientID(t) {
3939
return 0, proxyproto.ErrIncompatibleTLV
4040
}

0 commit comments

Comments
 (0)