gvisor.dev/gvisor@v0.0.0-20240520182842-f9d4d51c7e0f/pkg/sentry/socket/unix/transport/BUILD (about)

     1  load("//pkg/sync/locking:locking.bzl", "declare_mutex")
     2  load("//tools:defs.bzl", "go_library")
     3  load("//tools/go_generics:defs.bzl", "go_template_instance")
     4  
     5  package(
     6      default_applicable_licenses = ["//:license"],
     7      licenses = ["notice"],
     8  )
     9  
    10  declare_mutex(
    11      name = "queue_mutex",
    12      out = "queue_mutex.go",
    13      package = "transport",
    14      prefix = "queue",
    15  )
    16  
    17  declare_mutex(
    18      name = "stream_queue_receiver_mutex",
    19      out = "stream_queue_receiver_mutex.go",
    20      package = "transport",
    21      prefix = "streamQueueReceiver",
    22  )
    23  
    24  declare_mutex(
    25      name = "endpoint_mutex",
    26      out = "endpoint_mutex.go",
    27      nested_lock_names = [
    28          "higherID",
    29      ],
    30      package = "transport",
    31      prefix = "endpoint",
    32  )
    33  
    34  go_template_instance(
    35      name = "transport_message_list",
    36      out = "transport_message_list.go",
    37      package = "transport",
    38      prefix = "message",
    39      template = "//pkg/ilist:generic_list",
    40      types = {
    41          "Element": "*message",
    42          "Linker": "*message",
    43      },
    44  )
    45  
    46  go_template_instance(
    47      name = "queue_refs",
    48      out = "queue_refs.go",
    49      package = "transport",
    50      prefix = "queue",
    51      template = "//pkg/refs:refs_template",
    52      types = {
    53          "T": "queue",
    54      },
    55  )
    56  
    57  go_template_instance(
    58      name = "host_connected_endpoint_refs",
    59      out = "host_connected_endpoint_refs.go",
    60      package = "transport",
    61      prefix = "HostConnectedEndpoint",
    62      template = "//pkg/refs:refs_template",
    63      types = {
    64          "T": "HostConnectedEndpoint",
    65      },
    66  )
    67  
    68  go_library(
    69      name = "transport",
    70      srcs = [
    71          "connectioned.go",
    72          "connectioned_state.go",
    73          "connectionless.go",
    74          "connectionless_state.go",
    75          "endpoint_mutex.go",
    76          "host.go",
    77          "host_connected_endpoint_refs.go",
    78          "host_iovec.go",
    79          "host_unsafe.go",
    80          "queue.go",
    81          "queue_mutex.go",
    82          "queue_refs.go",
    83          "save_restore.go",
    84          "stream_queue_receiver_mutex.go",
    85          "transport_message_list.go",
    86          "unix.go",
    87      ],
    88      visibility = ["//:sandbox"],
    89      deps = [
    90          "//pkg/abi/linux",
    91          "//pkg/atomicbitops",
    92          "//pkg/buffer",
    93          "//pkg/context",
    94          "//pkg/errors/linuxerr",
    95          "//pkg/fdnotifier",
    96          "//pkg/ilist",
    97          "//pkg/log",
    98          "//pkg/refs",
    99          "//pkg/sentry/hostfd",
   100          "//pkg/sentry/uniqueid",
   101          "//pkg/sync",
   102          "//pkg/sync/locking",
   103          "//pkg/syserr",
   104          "//pkg/tcpip",
   105          "//pkg/unet",
   106          "//pkg/waiter",
   107          "@org_golang_x_sys//unix:go_default_library",
   108      ],
   109  )