sysctl

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRouterSysctl

func RegisterRouterSysctl(router *mux.Router)

RegisterRouterSysctl register with mux

Types

type Sysctl

type Sysctl struct {
	Key      string   `json:"Key"`
	Value    string   `json:"Value"`
	Apply    bool     `json:"Apply"`
	Pattern  string   `json:"Pattern"`
	FileName string   `json:"FileName"`
	Files    []string `json:"Files"`
}

Sysctl json request

func (*Sysctl) Acquire

func (s *Sysctl) Acquire(w http.ResponseWriter) error

Get sysctl key value from any of the following sysctl.conf, sysctl.d or /proc/sys

func (*Sysctl) GetPattern

func (s *Sysctl) GetPattern(w http.ResponseWriter) error

GetPatern will return all the entry with matching pattern If pattern is empty it should return all values

func (*Sysctl) Load

func (s *Sysctl) Load(w http.ResponseWriter) error

Load all the configuration files and apply

func (*Sysctl) Update

func (s *Sysctl) Update(w http.ResponseWriter) error

Update sysctl configuration file and apply Action can be SET, UPDATE or DELETE

Jump to

Keyboard shortcuts

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