Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add netutil package #100

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add netutil package #100

wants to merge 2 commits into from

Commits on Dec 17, 2021

  1. Add netutil package

    The new netutil package contains a new function
    `PrivateNetworkInterfaces` which can be used to obtain a list of
    non-loopback network interfaces that have private IP addresses.
    
    This is useful for providing default network interfaces in e.g. the ring
    configuration, like so:
    
    ```go
    cfg.InstanceInterfaceNames = netutil.PrivateNetworkInterfaces()
    f.Var((*flagext.StringSlice)(&cfg.InstanceInterfaceNames), ringFlagsPrefix+"instance-interface-names", "Name of network interface to read address from.")
    ```
    
    Signed-off-by: Christian Haudum <[email protected]>
    chaudum committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    16b0c93 View commit details
    Browse the repository at this point in the history
  2. fixup! Add netutil package

    Signed-off-by: Christian Haudum <[email protected]>
    chaudum committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    469be60 View commit details
    Browse the repository at this point in the history