alpine

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Copyright © 2021 Antoine Martin <antoine@openance.com>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIpAddress added in v0.2.0

func AddIpAddress(iface string, address net.IP) (err error)

AddIpAddress adds the IP address address to the interface iface.

It uses the default mask of the IP address class as the mask, and the default broadcast address as the broadcast address.

func AddIpMapping added in v0.2.0

func AddIpMapping(hostConfig *txeh.HostsConfig, ip net.IP, domainName string, toRemove []net.IP) (err error)

func CheckIpExists added in v0.2.0

func CheckIpExists(ip net.IP) (result bool, err error)

func DisableService added in v0.1.17

func DisableService(serviceName string) error

DisableService disables the service named serviceName

func EnableService

func EnableService(serviceName string) error

EnableService enables the service named serviceName

func EnsureMachineID added in v0.3.0

func EnsureMachineID() error

func EnsureNetFilter added in v0.1.5

func EnsureNetFilter() error

EnsureNetFilter ensures net filtering is available. It does so by checking The availability of the /proc/sys/net/bridge directory. On Windows 11, WSL2 includes br_netfilter in the kernel and modprobe is not available. On other linuxes, netfilter is provided as a module.

func EnsureOpenRCDirectory added in v0.3.0

func EnsureOpenRCDirectory() error

func ExecuteIfServiceNotStarted

func ExecuteIfServiceNotStarted(serviceName string, fn func() error) error

ExecuteIfServiceNotStarted executes the function fn if the service serviceName is not started.

func ExecuteIfServiceStarted

func ExecuteIfServiceStarted(serviceName string, fn func() error) error

ExecuteIfServiceStarted executes the fn function if the service serviceName is started.

func IpMappingForHost added in v0.3.3

func IpMappingForHost(hosts *txeh.Hosts, domainName string) (net.IP, error)

func IsHostMapped added in v0.2.2

func IsHostMapped(Ip net.IP, DomainName string) (bool, []net.IP)

func IsServiceStarted

func IsServiceStarted(serviceName string) (bool, error)

func PretendServiceStarted

func PretendServiceStarted(serviceName string) error

func StartOpenRC

func StartOpenRC() (err error)

StartOpenRC starts the openrc services in the default runlevel. If one of the services is already started, it is not restarted. It one is not started, it is started.

func StartService

func StartService(serviceName string) error

StartService start the serviceName service if it is not already started.

func StopService

func StopService(serviceName string) error

StopService stops the serviceName service if it is started.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL