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 ¶
- func EnableService(serviceName string) error
- func EnsureNetFilter() error
- func ExecuteIfServiceNotStarted(serviceName string, fn func() error) error
- func ExecuteIfServiceStarted(serviceName string, fn func() error) error
- func IsServiceStarted(serviceName string) (bool, error)
- func PretendServiceStarted(serviceName string) error
- func StartOpenRC() (err error)
- func StartService(serviceName string) error
- func StopService(serviceName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableService ¶
EnableService enables the service named serviceName
func EnsureNetFilter ¶ added in v0.1.5
func EnsureNetFilter() error
func ExecuteIfServiceNotStarted ¶
ExecuteIfServiceNotStarted executes the function fn if the service serviceName is not started.
func ExecuteIfServiceStarted ¶
ExecuteIfServiceStarted executes the fn function if the service serviceName is started.
func IsServiceStarted ¶
func PretendServiceStarted ¶
func StartOpenRC ¶
func StartOpenRC() (err error)
func StartService ¶
StartService start the serviceName service if it is not already started.
func StopService ¶
StopService stops the serviceName service if it is started.
Types ¶
This section is empty.