class

Wgctl::Models::Peer

Inherits JSON::Serializable < Reference < Object

Constructors

new(public_key : String, allowed_ips : Array(String) = [] of String, metadata : Metadata = Metadata.new, preshared_key : String | Nil = nil, endpoint : String | Nil = nil, persistent_keepalive : Int32 | Nil = nil, raw_comments : Array(String) = [] of String, raw_properties : Hash(String, String) = Hash(String, String).new, runtime : RuntimePeer | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

allowed_ips
Source
allowed_ips=(allowed_ips : Array(String))
Source
clean_ips
Source
description
Source
device
Source
effective_endpoint
Source
effective_handshake
Source
effective_rx
Source
effective_tx
Source
endpoint
Source
endpoint=(endpoint : String | Nil)
Source
has_name?
Source
matches?(query : String) : Bool

Matches a query by name or public key (full or prefix)

Source
metadata
Source
metadata=(metadata : Metadata)
Source
name
Source
online?
Source
persistent_keepalive
Source
persistent_keepalive=(persistent_keepalive : Int32 | Nil)
Source
preshared_key
Source
preshared_key=(preshared_key : String | Nil)
Source
primary_ip
Source
public_key
Source
public_key=(public_key : String)
Source
raw_comments

Non-wgctl comments above this peer

Source
raw_comments=(raw_comments : Array(String))

Non-wgctl comments above this peer

Source
raw_properties

Custom or unmanaged properties inside [Peer]

Source
raw_properties=(raw_properties : Hash(String, String))

Custom or unmanaged properties inside [Peer]

Source
runtime

Runtime state populated from wg show <iface> dump

Source
runtime=(runtime : RuntimePeer | Nil)

Runtime state populated from wg show <iface> dump

Source
short_key
Source
status_label
Source