gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/buffer/BUILD (about) 1 load("//tools:defs.bzl", "go_library", "go_test") 2 load("//tools/go_generics:defs.bzl", "go_template_instance") 3 4 package( 5 default_applicable_licenses = ["//:license"], 6 licenses = ["notice"], 7 ) 8 9 go_template_instance( 10 name = "chunk_refs", 11 out = "chunk_refs.go", 12 package = "buffer", 13 prefix = "chunk", 14 template = "//pkg/refs:refs_template", 15 types = { 16 "T": "chunk", 17 }, 18 ) 19 20 go_template_instance( 21 name = "view_list", 22 out = "view_list.go", 23 package = "buffer", 24 prefix = "View", 25 template = "//pkg/ilist:generic_list", 26 types = { 27 "Element": "*View", 28 "Linker": "*View", 29 }, 30 ) 31 32 go_library( 33 name = "buffer", 34 srcs = [ 35 "buffer.go", 36 "buffer_state.go", 37 "chunk.go", 38 "chunk_refs.go", 39 "view.go", 40 "view_list.go", 41 "view_unsafe.go", 42 ], 43 visibility = ["//visibility:public"], 44 deps = [ 45 "//pkg/atomicbitops", 46 "//pkg/bits", 47 "//pkg/context", 48 "//pkg/ilist", 49 "//pkg/log", 50 "//pkg/pool", 51 "//pkg/refs", 52 "//pkg/sync", 53 "//pkg/tcpip/checksum", 54 ], 55 ) 56 57 go_test( 58 name = "buffer_test", 59 srcs = [ 60 "buffer_test.go", 61 "view_test.go", 62 ], 63 library = ":buffer", 64 deps = [ 65 "//pkg/state", 66 "//pkg/tcpip/checksum", 67 "@com_github_google_go_cmp//cmp:go_default_library", 68 ], 69 )