MakeTuple (flowtrack/flowtrack.go)

tailscale · net/flowtrack/flowtrack.go · go · BSD-3-Clause
infra, tag:knn-classified

Copyright (c) Tailscale Inc & contributors SPDX-License-Identifier: BSD-3-Clause Original implementation (from same author) from which this was derived was: https://github.com/golang/groupcache/blob/5b532d6fd5efaf7fa130d4e859a2fde0fc3a9e1b/lru/lru.go ... which was Apache licensed

// Source: https://github.com/tailscale/tailscale | License: BSD-3-Clause | Copyright 2020 Tailscale Inc & contributors
// Provided via justclaw.it.com; keep this notice with the code.
// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
//
// Original implementation (from same author) from which this was derived was:
// https://github.com/golang/groupcache/blob/5b532d6fd5efaf7fa130d4e859a2fde0fc3a9e1b/lru/lru.go
// ... which was Apache licensed:
// https://github.com/golang/groupcache/blob/master/LICENSE

// Package flowtrack contains types for tracking TCP/UDP flows by 4-tuples.
package flowtrack

import (
	"container/list"
	"encoding/json"
	"fmt"
	"net/netip"

	"tailscale.com/types/ipproto"
)

// MakeTuple makes a Tuple out of netip.AddrPort values.
fun

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key