Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { // If set, use the given static network configuration instead of relying on // autoconfiguration. StaticConfig *netpb.Net // Vendor Class identifier of the system DHCPVendorClassID string DNS *dns.Service // Status is the current status of the network as seen by the service. Status memory.Value[*Status] // contains filtered or unexported fields }
Service is the network service for this node. It maintains all networking-related functionality, but is generally not aware of the inner workings of Metropolis, instead functioning in a generic manner. Once created via New, it can be started and restarted arbitrarily, but the service object itself must be long-lived.
func New ¶
New instantiates a new network service. If autoconfiguration is desired, staticConfig must be set to nil. If staticConfig is set to a non-nil value, it will be used instead of autoconfiguration. If dnsHandlerNames is non-nil, DNS handlers with these names must be set on the DNS service with s.DNS.SetHandler. When serving DNS queries, they will be tried in the order they appear here before forwarding.
func (*Service) AddLoopbackIP ¶
AddLoopbackIP adds the given IP to a loopback interface which can then be used to bind listeners to. Once this function returns, the IP is assigned and is ready to use. It's recommended to use defer to call ReleaseLoopbackIP to make sure IPs are released when the goroutine using it exits.
func (*Service) ReleaseLoopbackIP ¶
ReleaseLoopbackIP releases an IP allocated by AddLoopbackIP. Calling it multiple times for the same IP is an error.
Directories ¶
Path | Synopsis |
---|---|
Package dhcp4c implements a DHCPv4 Client as specified in RFC2131 (with some notable deviations).
|
Package dhcp4c implements a DHCPv4 Client as specified in RFC2131 (with some notable deviations). |
callback
Package callback contains minimal callbacks for configuring the kernel with options received over DHCP.
|
Package callback contains minimal callbacks for configuring the kernel with options received over DHCP. |
transport
Package transport contains Linux-based transports for the DHCP broadcast and unicast specifications.
|
Package transport contains Linux-based transports for the DHCP broadcast and unicast specifications. |
Package hostsfile implements a service which owns and writes all node-local files/interfaces used by the system to resolve the local node's name and the names of other nodes in the cluster:
|
Package hostsfile implements a service which owns and writes all node-local files/interfaces used by the system to resolve the local node's name and the names of other nodes in the cluster: |