sysctl

package
v0.0.0-...-ac9ea8b Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBoolSysctl

func AddBoolSysctl(name string, b *bool)

func AddInt64Sysctl

func AddInt64Sysctl(name string, i *int64)

func AddIntSysctl

func AddIntSysctl(name string, i *int)

func AddMemSysctl

func AddMemSysctl(name string, mem *uint64)

func AddRoSysctl

func AddRoSysctl(name string, read func() string)

func AddStringSysctl

func AddStringSysctl(name string, s *string)

func AddSysctl

func AddSysctl(name string, get func() string, set func(string) error)

func AddTimeSysctl

func AddTimeSysctl(name string, d *time.Duration)

Types

type Sysctl

type Sysctl struct {
	Get  func() string
	Set  func(string) error
	Name string
}

func (*Sysctl) Add

func (_ *Sysctl) Add(ctx context.Context, _ interface{}) *xrest.ReqErr

func (*Sysctl) Del

func (_ *Sysctl) Del(ctx context.Context) *xrest.ReqErr

func (*Sysctl) Info

func (ctl *Sysctl) Info(ctx context.Context, q url.Values, details bool) (interface{}, *xrest.ReqErr)

func (*Sysctl) Upd

func (ctl *Sysctl) Upd(ctx context.Context, upd interface{}) *xrest.ReqErr

type Sysctls

type Sysctls struct{}

func (Sysctls) Create

func (_ Sysctls) Create(ctx context.Context, _ interface{}) (xrest.Obj, *xrest.ReqErr)

func (Sysctls) Get

func (_ Sysctls) Get(ctx context.Context, r *http.Request) (xrest.Obj, *xrest.ReqErr)

func (Sysctls) Iterate

func (_ Sysctls) Iterate(ctx context.Context, q url.Values, cb func(context.Context, xrest.Obj) *xrest.ReqErr) *xrest.ReqErr

Jump to

Keyboard shortcuts

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