nl-linux 0.2.4 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec +3 -0
- data/.yardopts +5 -0
- data/CHANGELOG.md +8 -0
- data/Rakefile +27 -5
- data/generated/nl/linux/binder.rb +227 -19
- data/generated/nl/linux/conntrack.rb +1325 -365
- data/generated/nl/linux/dev_energymodel.rb +357 -66
- data/generated/nl/linux/devlink.rb +6310 -1859
- data/generated/nl/linux/dpll.rb +2202 -376
- data/generated/nl/linux/drm_ras.rb +312 -63
- data/generated/nl/linux/ethtool.rb +7555 -2447
- data/generated/nl/linux/fou.rb +381 -133
- data/generated/nl/linux/handshake.rb +340 -70
- data/generated/nl/linux/lockd.rb +132 -27
- data/generated/nl/linux/mptcp_pm.rb +773 -161
- data/generated/nl/linux/net_shaper.rb +892 -211
- data/generated/nl/linux/netdev.rb +2366 -518
- data/generated/nl/linux/nfsd.rb +1299 -317
- data/generated/nl/linux/nftables.rb +5351 -1533
- data/generated/nl/linux/nl80211.rb +4601 -882
- data/generated/nl/linux/nlctrl.rb +460 -117
- data/generated/nl/linux/ovpn.rb +1360 -262
- data/generated/nl/linux/ovs_datapath.rb +312 -98
- data/generated/nl/linux/ovs_flow.rb +1866 -358
- data/generated/nl/linux/ovs_packet.rb +331 -45
- data/generated/nl/linux/ovs_vport.rb +374 -123
- data/generated/nl/linux/psp.rb +1093 -201
- data/generated/nl/linux/rt_addr.rb +423 -165
- data/generated/nl/linux/rt_link.rb +6928 -1336
- data/generated/nl/linux/rt_neigh.rb +1063 -297
- data/generated/nl/linux/rt_route.rb +1112 -483
- data/generated/nl/linux/rt_rule.rb +931 -262
- data/generated/nl/linux/sunrpc_cache.rb +407 -82
- data/generated/nl/linux/tc.rb +10081 -1763
- data/generated/nl/linux/tcp_metrics.rb +388 -109
- data/generated/nl/linux/team.rb +350 -84
- data/generated/nl/linux/wireguard.rb +525 -96
- data/generated/nl/linux.rb +1 -0
- data/lib/nl/linux/nlctrl_resolver.rb +31 -0
- data/lib/nl/linux/version.rb +1 -1
- data/sig/generated/nl/linux/binder.rbs +366 -0
- data/sig/generated/nl/linux/conntrack.rbs +2787 -0
- data/sig/generated/nl/linux/dev_energymodel.rbs +636 -0
- data/sig/generated/nl/linux/devlink.rbs +12496 -0
- data/sig/generated/nl/linux/dpll.rbs +3461 -0
- data/sig/generated/nl/linux/drm_ras.rbs +553 -0
- data/sig/generated/nl/linux/ethtool.rbs +15291 -0
- data/sig/generated/nl/linux/fou.rbs +702 -0
- data/sig/generated/nl/linux/handshake.rbs +622 -0
- data/sig/generated/nl/linux/lockd.rbs +234 -0
- data/sig/generated/nl/linux/mptcp_pm.rbs +1511 -0
- data/sig/generated/nl/linux/net_shaper.rbs +1645 -0
- data/sig/generated/nl/linux/netdev.rbs +4187 -0
- data/sig/generated/nl/linux/nfsd.rbs +2520 -0
- data/sig/generated/nl/linux/nftables.rbs +10304 -0
- data/sig/generated/nl/linux/nl80211.rbs +9786 -0
- data/sig/generated/nl/linux/nlctrl.rbs +944 -0
- data/sig/generated/nl/linux/nlctrl_resolver.rbs +20 -0
- data/sig/generated/nl/linux/ovpn.rbs +2564 -0
- data/sig/generated/nl/linux/ovs_datapath.rbs +640 -0
- data/sig/generated/nl/linux/ovs_flow.rbs +3659 -0
- data/sig/generated/nl/linux/ovs_packet.rbs +540 -0
- data/sig/generated/nl/linux/ovs_vport.rbs +777 -0
- data/sig/generated/nl/linux/psp.rbs +1846 -0
- data/sig/generated/nl/linux/rt_addr.rbs +866 -0
- data/sig/generated/nl/linux/rt_link.rbs +13438 -0
- data/sig/generated/nl/linux/rt_neigh.rbs +2124 -0
- data/sig/generated/nl/linux/rt_route.rbs +2218 -0
- data/sig/generated/nl/linux/rt_rule.rbs +1726 -0
- data/sig/generated/nl/linux/sunrpc_cache.rbs +739 -0
- data/sig/generated/nl/linux/tc.rbs +19931 -0
- data/sig/generated/nl/linux/tcp_metrics.rbs +740 -0
- data/sig/generated/nl/linux/team.rbs +733 -0
- data/sig/generated/nl/linux/version.rbs +7 -0
- data/sig/generated/nl/linux/wireguard.rbs +1006 -0
- data/sig/generated/nl/linux.rbs +6 -0
- data/sig/generated/nl-linux.rbs +2 -0
- metadata +51 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e70391884268288b55d3d2edfc5c1d6098d9e024f5f3fed11c5bffa3cc5e126d
|
|
4
|
+
data.tar.gz: 1cea0a6656c54771123617dc4cb9bcd9a9d977008cabe156257642b3c39e2bb7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dcdce1ce44505fa4b856e3d50f573f1fb2314b856b36c42bc3e777b86af125aa3981dcc93860480c0cdaf909ecea9c9b2d3ff6c4422c4d27d1e77ce2440b3857
|
|
7
|
+
data.tar.gz: 7d3d92cb1104e2eb8d1e35521d62030e60d1f521498400fb55d518b1d8cc6b3c7485ee2a2e2e0fdd702ef3fd9dca5fe9d1202e3b6ae88feccdbfbbf43b3b4407
|
data/.rspec
ADDED
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
data/Rakefile
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
require 'rspec/core/rake_task'
|
|
2
2
|
|
|
3
|
+
NLSPEC_PATH = 'Documentation/netlink/specs'
|
|
4
|
+
NLSPEC_VERSION = File.read('NLSPEC_VERSION').chomp
|
|
5
|
+
|
|
3
6
|
RSpec::Core::RakeTask.new(:spec)
|
|
4
7
|
|
|
5
8
|
task default: :spec
|
|
@@ -20,24 +23,35 @@ end
|
|
|
20
23
|
specs.each do |spec, h|
|
|
21
24
|
h => {source:, target:}
|
|
22
25
|
task :generate => target
|
|
23
|
-
task target => [source, 'generated/nl/linux'] do
|
|
26
|
+
task target => [source, 'generated/nl/linux', 'NLSPEC_VERSION', 'Rakefile'] do
|
|
24
27
|
require 'ynl'
|
|
25
28
|
File.open(source, 'r') do |src|
|
|
26
|
-
|
|
29
|
+
comments = src.readlines.take_while {|l| !l.start_with?('---') }.grep(/\A\#/)
|
|
27
30
|
|
|
28
31
|
File.open(target, 'w') do |out|
|
|
29
|
-
out <<
|
|
32
|
+
out << comments.shift
|
|
33
|
+
out << "#\n"
|
|
34
|
+
out << "# This file is based on #{NLSPEC_PATH}/#{spec} from Linux v#{NLSPEC_VERSION}.\n"
|
|
35
|
+
unless comments.empty?
|
|
36
|
+
out << "#\n"
|
|
37
|
+
out << "# Original YNL comment:\n"
|
|
38
|
+
out << comments.join
|
|
39
|
+
end
|
|
30
40
|
out << "#--\n"
|
|
31
41
|
out << Ynl::Generator::PRELUDE
|
|
32
42
|
out << "module Nl; module Linux\n"
|
|
33
|
-
Ynl::Family.generate(
|
|
43
|
+
Ynl::Family.generate(
|
|
44
|
+
src.tap(&:rewind),
|
|
45
|
+
out,
|
|
46
|
+
default_resolver: '::Nl::Linux::DEFAULT_RESOLVER',
|
|
47
|
+
)
|
|
34
48
|
out << "end; end\n"
|
|
35
49
|
end
|
|
36
50
|
end
|
|
37
51
|
end
|
|
38
52
|
end
|
|
39
53
|
|
|
40
|
-
task 'generated/nl/linux.rb' => specs.values.map { it[:target] } do |t|
|
|
54
|
+
task 'generated/nl/linux.rb' => [*specs.values.map { it[:target] }, 'Rakefile'] do |t|
|
|
41
55
|
File.open(t.name, 'w') do |out|
|
|
42
56
|
out << "require 'nl/linux/version'\n"
|
|
43
57
|
out << "module Nl\n"
|
|
@@ -50,8 +64,16 @@ task 'generated/nl/linux.rb' => specs.values.map { it[:target] } do |t|
|
|
|
50
64
|
end
|
|
51
65
|
out << " end\n"
|
|
52
66
|
out << "end\n"
|
|
67
|
+
out << "require 'nl/linux/nlctrl_resolver'\n"
|
|
53
68
|
end
|
|
54
69
|
end
|
|
55
70
|
task :generate => 'generated/nl/linux.rb'
|
|
56
71
|
|
|
72
|
+
desc 'Generate RBS signatures from inline annotations'
|
|
73
|
+
task :rbs => :generate do
|
|
74
|
+
sh '../bin/rbs-inline', '--output=sig/generated', '--opt-out', '--base=lib:generated', 'lib', 'generated'
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
task :build => :rbs
|
|
78
|
+
|
|
57
79
|
task :default => :generate
|
|
@@ -1,96 +1,304 @@
|
|
|
1
1
|
# SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)
|
|
2
2
|
#
|
|
3
|
+
# This file is based on Documentation/netlink/specs/binder.yaml from Linux v7.2.
|
|
4
|
+
#
|
|
5
|
+
# Original YNL comment:
|
|
6
|
+
#
|
|
3
7
|
# Copyright 2025 Google LLC
|
|
4
8
|
#
|
|
5
9
|
#--
|
|
6
10
|
# frozen_string_literal: true
|
|
7
|
-
# rbs_inline: enabled
|
|
8
11
|
# This code is generated by Ynl::Generator. DO NOT EDIT.
|
|
9
12
|
require 'nl'
|
|
10
13
|
module Nl; module Linux
|
|
11
14
|
# Binder interface over generic netlink
|
|
12
|
-
class Binder < ::Nl::Family
|
|
15
|
+
class Binder < ::Nl::Genl::Family
|
|
13
16
|
NAME = "binder"
|
|
14
|
-
|
|
17
|
+
VERSION = 1
|
|
18
|
+
# @rbs (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) -> (::Nl::Family::Session & instance)
|
|
19
|
+
# @rbs | [R] (?resolver: ^(::Nl::Genl::Client, ::String) -> ::Nl::Genl::FamilyInfo, ?executor: executor?, ?notification_capacity: ::Integer?) { (instance) -> R } -> R
|
|
20
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
21
|
+
# @param [#call] resolver
|
|
22
|
+
# @param [Symbol, nil] executor
|
|
23
|
+
# @param [Integer, nil] notification_capacity
|
|
24
|
+
# @return [Binder]
|
|
25
|
+
# @overload open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY, &block)
|
|
26
|
+
# @param [#call] resolver
|
|
27
|
+
# @param [Symbol, nil] executor
|
|
28
|
+
# @param [Integer, nil] notification_capacity
|
|
29
|
+
# @yieldparam [Binder] family
|
|
30
|
+
# @return [Object] the result of the block
|
|
31
|
+
def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
|
|
32
|
+
super
|
|
33
|
+
end
|
|
34
|
+
# @private
|
|
35
|
+
MCAST_GROUPS = Ractor.make_shareable({:"report" => ::Nl::McastGroup.new("report", nil)}) #: Hash[::Symbol, ::Nl::McastGroup]
|
|
15
36
|
module Structs
|
|
16
37
|
end
|
|
17
38
|
module AttributeSets
|
|
18
39
|
# Attributes included within a transaction failure report. The elements
|
|
19
40
|
# correspond directly with the specific transaction that failed, along
|
|
20
41
|
# with the error returned to the sender e.g. BR_DEAD_REPLY.
|
|
21
|
-
class Report < ::Nl::
|
|
42
|
+
class Report < ::Nl::AttributeSet
|
|
22
43
|
# Abstract class
|
|
23
|
-
class Attribute < ::Nl::
|
|
44
|
+
class Attribute < ::Nl::AttributeSet::Attribute
|
|
24
45
|
end
|
|
46
|
+
# The enum binder_driver_return_protocol returned to the sender.
|
|
25
47
|
class Error < Attribute
|
|
26
48
|
TYPE = 1
|
|
27
49
|
NAME = :"error"
|
|
28
|
-
|
|
50
|
+
# @private
|
|
51
|
+
ORDER = 0
|
|
52
|
+
# @private
|
|
53
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
29
54
|
end
|
|
55
|
+
# The binder context where the transaction occurred.
|
|
30
56
|
class Context < Attribute
|
|
31
57
|
TYPE = 2
|
|
32
58
|
NAME = :"context"
|
|
33
|
-
|
|
59
|
+
# @private
|
|
60
|
+
ORDER = 1
|
|
61
|
+
# @private
|
|
62
|
+
DATATYPE = ::Nl::DataTypes::String.new(check: nil)
|
|
34
63
|
end
|
|
64
|
+
# The PID of the sender process.
|
|
35
65
|
class FromPid < Attribute
|
|
36
66
|
TYPE = 3
|
|
37
67
|
NAME = :"from_pid"
|
|
38
|
-
|
|
68
|
+
# @private
|
|
69
|
+
ORDER = 2
|
|
70
|
+
# @private
|
|
71
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
39
72
|
end
|
|
73
|
+
# The TID of the sender thread.
|
|
40
74
|
class FromTid < Attribute
|
|
41
75
|
TYPE = 4
|
|
42
76
|
NAME = :"from_tid"
|
|
43
|
-
|
|
77
|
+
# @private
|
|
78
|
+
ORDER = 3
|
|
79
|
+
# @private
|
|
80
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
44
81
|
end
|
|
82
|
+
# The PID of the recipient process. This attribute may not be present
|
|
83
|
+
# if the target could not be determined.
|
|
45
84
|
class ToPid < Attribute
|
|
46
85
|
TYPE = 5
|
|
47
86
|
NAME = :"to_pid"
|
|
48
|
-
|
|
87
|
+
# @private
|
|
88
|
+
ORDER = 4
|
|
89
|
+
# @private
|
|
90
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
49
91
|
end
|
|
92
|
+
# The TID of the recipient thread. This attribute may not be present
|
|
93
|
+
# if the target could not be determined.
|
|
50
94
|
class ToTid < Attribute
|
|
51
95
|
TYPE = 6
|
|
52
96
|
NAME = :"to_tid"
|
|
53
|
-
|
|
97
|
+
# @private
|
|
98
|
+
ORDER = 5
|
|
99
|
+
# @private
|
|
100
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
54
101
|
end
|
|
102
|
+
# When present, indicates the failed transaction is a reply.
|
|
55
103
|
class IsReply < Attribute
|
|
56
104
|
TYPE = 7
|
|
57
105
|
NAME = :"is_reply"
|
|
58
|
-
|
|
106
|
+
# @private
|
|
107
|
+
ORDER = 6
|
|
108
|
+
# @private
|
|
109
|
+
DATATYPE = ::Nl::DataTypes::Flag.new
|
|
59
110
|
end
|
|
111
|
+
# The bitmask of enum transaction_flags from the transaction.
|
|
60
112
|
class Flags < Attribute
|
|
61
113
|
TYPE = 8
|
|
62
114
|
NAME = :"flags"
|
|
63
|
-
|
|
115
|
+
# @private
|
|
116
|
+
ORDER = 7
|
|
117
|
+
# @private
|
|
118
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
64
119
|
end
|
|
120
|
+
# The application-defined code from the transaction.
|
|
65
121
|
class Code < Attribute
|
|
66
122
|
TYPE = 9
|
|
67
123
|
NAME = :"code"
|
|
68
|
-
|
|
124
|
+
# @private
|
|
125
|
+
ORDER = 8
|
|
126
|
+
# @private
|
|
127
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
69
128
|
end
|
|
129
|
+
# The transaction payload size in bytes.
|
|
70
130
|
class DataSize < Attribute
|
|
71
131
|
TYPE = 10
|
|
72
132
|
NAME = :"data_size"
|
|
73
|
-
|
|
133
|
+
# @private
|
|
134
|
+
ORDER = 9
|
|
135
|
+
# @private
|
|
136
|
+
DATATYPE = ::Nl::DataTypes::Scalar.new(::Nl::Endian::Host::U32, check: nil)
|
|
74
137
|
end
|
|
75
|
-
#
|
|
138
|
+
# @private
|
|
76
139
|
BY_NAME = Ractor.make_shareable({:"error" => Error, :"context" => Context, :"from_pid" => FromPid, :"from_tid" => FromTid, :"to_pid" => ToPid, :"to_tid" => ToTid, :"is_reply" => IsReply, :"flags" => Flags, :"code" => Code, :"data_size" => DataSize}) #: Hash[::Symbol, Attribute]
|
|
77
|
-
#
|
|
140
|
+
# @private
|
|
78
141
|
BY_TYPE = Ractor.make_shareable({1 => Error, 2 => Context, 3 => FromPid, 4 => FromTid, 5 => ToPid, 6 => ToTid, 7 => IsReply, 8 => Flags, 9 => Code, 10 => DataSize}) #: Hash[::Integer, Attribute]
|
|
142
|
+
# The enum binder_driver_return_protocol returned to the sender.
|
|
143
|
+
# @rbs return: ::Integer
|
|
144
|
+
# @return [Integer]
|
|
145
|
+
# @see Error
|
|
146
|
+
def error; self[:"error"]&.value; end
|
|
147
|
+
# The binder context where the transaction occurred.
|
|
148
|
+
# @rbs return: ::String
|
|
149
|
+
# @return [String]
|
|
150
|
+
# @see Context
|
|
151
|
+
def context; self[:"context"]&.value; end
|
|
152
|
+
# The PID of the sender process.
|
|
153
|
+
# @rbs return: ::Integer
|
|
154
|
+
# @return [Integer]
|
|
155
|
+
# @see FromPid
|
|
156
|
+
def from_pid; self[:"from_pid"]&.value; end
|
|
157
|
+
# The TID of the sender thread.
|
|
158
|
+
# @rbs return: ::Integer
|
|
159
|
+
# @return [Integer]
|
|
160
|
+
# @see FromTid
|
|
161
|
+
def from_tid; self[:"from_tid"]&.value; end
|
|
162
|
+
# The PID of the recipient process. This attribute may not be present
|
|
163
|
+
# if the target could not be determined.
|
|
164
|
+
# @rbs return: ::Integer
|
|
165
|
+
# @return [Integer]
|
|
166
|
+
# @see ToPid
|
|
167
|
+
def to_pid; self[:"to_pid"]&.value; end
|
|
168
|
+
# The TID of the recipient thread. This attribute may not be present
|
|
169
|
+
# if the target could not be determined.
|
|
170
|
+
# @rbs return: ::Integer
|
|
171
|
+
# @return [Integer]
|
|
172
|
+
# @see ToTid
|
|
173
|
+
def to_tid; self[:"to_tid"]&.value; end
|
|
174
|
+
# When present, indicates the failed transaction is a reply.
|
|
175
|
+
# @rbs return: ::Integer
|
|
176
|
+
# @return [Integer]
|
|
177
|
+
# @see IsReply
|
|
178
|
+
def is_reply; self[:"is_reply"]&.value; end
|
|
179
|
+
# The bitmask of enum transaction_flags from the transaction.
|
|
180
|
+
# @rbs return: ::Integer
|
|
181
|
+
# @return [Integer]
|
|
182
|
+
# @see Flags
|
|
183
|
+
def flags; self[:"flags"]&.value; end
|
|
184
|
+
# The application-defined code from the transaction.
|
|
185
|
+
# @rbs return: ::Integer
|
|
186
|
+
# @return [Integer]
|
|
187
|
+
# @see Code
|
|
188
|
+
def code; self[:"code"]&.value; end
|
|
189
|
+
# The transaction payload size in bytes.
|
|
190
|
+
# @rbs return: ::Integer
|
|
191
|
+
# @return [Integer]
|
|
192
|
+
# @see DataSize
|
|
193
|
+
def data_size; self[:"data_size"]&.value; end
|
|
79
194
|
class << self
|
|
80
195
|
# Looks up Attribute class by name.
|
|
81
|
-
#--
|
|
82
196
|
# @rbs name: Symbol
|
|
83
197
|
# @rbs return: Attribute
|
|
198
|
+
# @param [Symbol] name
|
|
199
|
+
# @return [Attribute]
|
|
84
200
|
def by_name(name); BY_NAME.fetch(name); end
|
|
85
201
|
# Looks up Attribute class by type value.
|
|
86
|
-
#--
|
|
87
202
|
# @rbs type: Integer
|
|
88
203
|
# @rbs return: Attribute
|
|
204
|
+
# @param [Integer] type
|
|
205
|
+
# @return [Attribute]
|
|
89
206
|
def by_type(type); BY_TYPE.fetch(type); end
|
|
90
207
|
end
|
|
91
208
|
end
|
|
92
209
|
end
|
|
93
210
|
module Messages
|
|
94
211
|
end
|
|
212
|
+
module Notifications
|
|
213
|
+
# A multicast event sent to userspace subscribers to notify them about
|
|
214
|
+
# binder transaction failures. The generated report provides the full
|
|
215
|
+
# details of the specific transaction that failed. The intention is for
|
|
216
|
+
# programs to monitor these events and react to the failures as needed.
|
|
217
|
+
#
|
|
218
|
+
#
|
|
219
|
+
# Multicast group: `report`.
|
|
220
|
+
class Report < ::Nl::Genl::Message
|
|
221
|
+
TYPE = 1
|
|
222
|
+
FIXED_HEADER = nil
|
|
223
|
+
ATTRIBUTE_SET = AttributeSets::Report
|
|
224
|
+
ATTRIBUTES = Ractor.make_shareable(%i[error context from_pid from_tid to_pid to_tid is_reply flags code data_size])
|
|
225
|
+
# The enum binder_driver_return_protocol returned to the sender.
|
|
226
|
+
# @rbs return: ::Integer
|
|
227
|
+
# @return [Integer]
|
|
228
|
+
# @see AttributeSets::Report::Error
|
|
229
|
+
def error; attributes[:"error"]&.value; end
|
|
230
|
+
# The binder context where the transaction occurred.
|
|
231
|
+
# @rbs return: ::String
|
|
232
|
+
# @return [String]
|
|
233
|
+
# @see AttributeSets::Report::Context
|
|
234
|
+
def context; attributes[:"context"]&.value; end
|
|
235
|
+
# The PID of the sender process.
|
|
236
|
+
# @rbs return: ::Integer
|
|
237
|
+
# @return [Integer]
|
|
238
|
+
# @see AttributeSets::Report::FromPid
|
|
239
|
+
def from_pid; attributes[:"from_pid"]&.value; end
|
|
240
|
+
# The TID of the sender thread.
|
|
241
|
+
# @rbs return: ::Integer
|
|
242
|
+
# @return [Integer]
|
|
243
|
+
# @see AttributeSets::Report::FromTid
|
|
244
|
+
def from_tid; attributes[:"from_tid"]&.value; end
|
|
245
|
+
# The PID of the recipient process. This attribute may not be present
|
|
246
|
+
# if the target could not be determined.
|
|
247
|
+
# @rbs return: ::Integer
|
|
248
|
+
# @return [Integer]
|
|
249
|
+
# @see AttributeSets::Report::ToPid
|
|
250
|
+
def to_pid; attributes[:"to_pid"]&.value; end
|
|
251
|
+
# The TID of the recipient thread. This attribute may not be present
|
|
252
|
+
# if the target could not be determined.
|
|
253
|
+
# @rbs return: ::Integer
|
|
254
|
+
# @return [Integer]
|
|
255
|
+
# @see AttributeSets::Report::ToTid
|
|
256
|
+
def to_tid; attributes[:"to_tid"]&.value; end
|
|
257
|
+
# When present, indicates the failed transaction is a reply.
|
|
258
|
+
# @rbs return: ::Integer
|
|
259
|
+
# @return [Integer]
|
|
260
|
+
# @see AttributeSets::Report::IsReply
|
|
261
|
+
def is_reply; attributes[:"is_reply"]&.value; end
|
|
262
|
+
# The bitmask of enum transaction_flags from the transaction.
|
|
263
|
+
# @rbs return: ::Integer
|
|
264
|
+
# @return [Integer]
|
|
265
|
+
# @see AttributeSets::Report::Flags
|
|
266
|
+
def flags; attributes[:"flags"]&.value; end
|
|
267
|
+
# The application-defined code from the transaction.
|
|
268
|
+
# @rbs return: ::Integer
|
|
269
|
+
# @return [Integer]
|
|
270
|
+
# @see AttributeSets::Report::Code
|
|
271
|
+
def code; attributes[:"code"]&.value; end
|
|
272
|
+
# The transaction payload size in bytes.
|
|
273
|
+
# @rbs return: ::Integer
|
|
274
|
+
# @return [Integer]
|
|
275
|
+
# @see AttributeSets::Report::DataSize
|
|
276
|
+
def data_size; attributes[:"data_size"]&.value; end
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
# @private
|
|
280
|
+
NOTIFICATIONS = Ractor.make_shareable({1 => Notifications::Report}) #: Hash[::Integer, ::Class]
|
|
281
|
+
class AsyncOperations
|
|
282
|
+
# @private
|
|
283
|
+
def initialize(&exchange)
|
|
284
|
+
@exchange = exchange
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
# Returns the asynchronous operation facade for this family.
|
|
288
|
+
# @rbs (?stream_capacity: ::Integer?) -> AsyncOperations
|
|
289
|
+
# @param [::Integer, nil] stream_capacity
|
|
290
|
+
# @return [AsyncOperations]
|
|
291
|
+
def async(stream_capacity: nil)
|
|
292
|
+
return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
|
|
293
|
+
build_async_facade(AsyncOperations, stream_capacity:)
|
|
294
|
+
end
|
|
295
|
+
# @rbs (*(:report) groups) -> self
|
|
296
|
+
# @param [Array<:report>] groups
|
|
297
|
+
# @return [self]
|
|
298
|
+
def subscribe(*groups) = super
|
|
299
|
+
# @rbs (*(:report) groups) -> self
|
|
300
|
+
# @param [Array<:report>] groups
|
|
301
|
+
# @return [self]
|
|
302
|
+
def unsubscribe(*groups) = super
|
|
95
303
|
end
|
|
96
304
|
end; end
|