Class: Nl::Linux::TcpMetrics

Inherits:
Genl::Family show all
Defined in:
nl-linux/generated/nl/linux/tcp_metrics.rb

Overview

Management interface for TCP metrics.

Defined Under Namespace

Modules: AttributeSets, Constants, Messages, Notifications, Structs Classes: AsyncOperations

Constant Summary collapse

NAME =
"tcp_metrics"
VERSION =
1

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Genl::Family

version

Class Method Details

.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) ⇒ TcpMetrics .open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) {|family| ... } ⇒ Object

Overloads:

  • .open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) ⇒ TcpMetrics

    Parameters:

    • resolver (#call) (defaults to: ::Nl::Linux::DEFAULT_RESOLVER)
    • executor (Symbol, nil) (defaults to: nil)
    • notification_capacity (Integer, nil) (defaults to: DEFAULT_NOTIFICATION_CAPACITY)

    Returns:

  • .open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY) {|family| ... } ⇒ Object

    Returns the result of the block.

    Parameters:

    • resolver (#call) (defaults to: ::Nl::Linux::DEFAULT_RESOLVER)
    • executor (Symbol, nil) (defaults to: nil)
    • notification_capacity (Integer, nil) (defaults to: DEFAULT_NOTIFICATION_CAPACITY)

    Yield Parameters:

    Returns:

    • (Object) —

      the result of the block



26
27
28
# File 'nl-linux/generated/nl/linux/tcp_metrics.rb', line 26

def self.open(resolver: ::Nl::Linux::DEFAULT_RESOLVER, executor: nil, notification_capacity: DEFAULT_NOTIFICATION_CAPACITY)
  super
end

Instance Method Details

#async(stream_capacity: nil) ⇒ AsyncOperations

Returns the asynchronous operation facade for this family.

Parameters:

  • stream_capacity (::Integer, nil) (defaults to: nil)

Returns:



591
592
593
594
# File 'nl-linux/generated/nl/linux/tcp_metrics.rb', line 591

def async(stream_capacity: nil)
  return @async_operations ||= build_async_facade(AsyncOperations) if stream_capacity.nil?
  build_async_facade(AsyncOperations, stream_capacity:)
end

#do_del(**args) ⇒ void

This method returns an undefined value.

Delete metrics.

Requires CAP_NET_ADMIN in the initial user namespace.

Parameters:

  • args (Hash)

Options Hash (**args):

  • addr_ipv4 (Integer)
  • addr_ipv6 (String)
  • saddr_ipv4 (Integer)
  • saddr_ipv6 (String)

See Also:



544
545
546
# File 'nl-linux/generated/nl/linux/tcp_metrics.rb', line 544

def do_del(**args)
  exchange_message(:"do", Messages::DoDelRequest, nil, args)
end

#do_get(**args) ⇒ Messages::DoGetReply

Retrieve metrics.

Parameters:

  • args (Hash)

Options Hash (**args):

  • addr_ipv4 (Integer)
  • addr_ipv6 (String)
  • saddr_ipv4 (Integer)
  • saddr_ipv6 (String)

Returns:

See Also:



514
515
516
# File 'nl-linux/generated/nl/linux/tcp_metrics.rb', line 514

def do_get(**args)
  exchange_message(:"do", Messages::DoGetRequest, Messages::DoGetReply, args)
end

#dump_get(**args) ⇒ Array<Messages::DumpGetReply> #dump_get(**args) {|reply| ... } ⇒ void

Retrieve metrics.

Overloads:

  • #dump_get(**args) ⇒ Array<Messages::DumpGetReply>

    Returns an array when no block is given.

    Parameters:

    • args (Hash)

    Returns:

  • #dump_get(**args) {|reply| ... } ⇒ void

    This method returns an undefined value.

    Yields each reply when a block is given.

    Parameters:

    • args (Hash)

    Yield Parameters:

See Also:



530
531
532
# File 'nl-linux/generated/nl/linux/tcp_metrics.rb', line 530

def dump_get(**args, &block)
  exchange_message(:"dump", Messages::DumpGetRequest, Messages::DumpGetReply, args, &block)
end