class

Wgctl::Models::Interface

Inherits JSON::Serializable < Reference < Object

Constructors

new(name : String, config_path : String | Nil = nil, address : Array(String) = [] of String, listen_port : Int32 | Nil = nil, private_key : String | Nil = nil, peers : Array(Peer) = [] of Peer, raw_headers : Array(String) = [] of String, raw_properties : Hash(String, Array(String)) = Hash(String, Array(String)).new, server_endpoint : String | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

active

Runtime properties

Source
active=(active : Bool)

Runtime properties

Source
address
Source
address=(address : Array(String))
Source
all_assigned_ips
Source
config_path
Source
config_path=(config_path : String | Nil)
Source
effective_address
Source
effective_listen_port
Source
endpoint
Source
find_peer(query : String) : Peer | Nil
Source
listen_port
Source
listen_port=(listen_port : Int32 | Nil)
Source
name
Source
name=(name : String)
Source
peer_exists_by_ip?(target_ip : String) : Bool
Source
peer_exists_by_key?(key : String) : Bool
Source
peer_exists_by_name?(name : String) : Bool
Source
peers
Source
peers=(peers : Array(Peer))
Source
private_key

Never serialize private_key in status / json dump for security

Source
private_key=(private_key : String | Nil)

Never serialize private_key in status / json dump for security

Source
raw_headers

Comments or instructions before or within [Interface]

Source
raw_headers=(raw_headers : Array(String))

Comments or instructions before or within [Interface]

Source
raw_properties
Source
raw_properties=(raw_properties : Hash(String, Array(String)))
Source
runtime_listen_port
Source
runtime_listen_port=(runtime_listen_port : Int32 | Nil)
Source
runtime_public_key
Source
runtime_public_key=(runtime_public_key : String | Nil)
Source
server_endpoint

Server public endpoint (e.g. 204.216.154.80:51820)

Source
server_endpoint=(server_endpoint : String | Nil)

Server public endpoint (e.g. 204.216.154.80:51820)

Source