File: node.go

package info (click to toggle)
golang-github-jedisct1-go-sieve-cache 0.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 188 kB
  • sloc: makefile: 4
file content (15 lines) | stat: -rw-r--r-- 278 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package sievecache

// Node represents an internal cache entry
type Node[K comparable, V any] struct {
	Key   K
	Value V
}

// NewNode creates a new cache node
func NewNode[K comparable, V any](key K, value V) Node[K, V] {
	return Node[K, V]{
		Key:   key,
		Value: value,
	}
}