daemon

package
v0.0.0-...-5732428 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DomainSocketFile is the file name of unix domain socket server that saptune daemon listens on.
	DomainSocketFile = "/var/run/saptune"
)

Variables

View Source
var RPCObjNameFmt = reflect.TypeOf(FunctionHost{}).Name() + ".%s"

RPCObjNameFmt is a format string that helps client to construct RPC call function name.

Functions

This section is empty.

Types

type Client

type Client struct {
}

Client connects to RPC server via domain socket in order to call RPC functions.

func (*Client) SetForceLatency

func (client *Client) SetForceLatency(newValue int) error

SetForceLatency instructs RPC server to maintain a new value for cpu_dma_latency.

func (*Client) StopForceLatency

func (client *Client) StopForceLatency() error

StopForceLatency instructs RPC server to stop background loop that maintains cpu_dma_latency value.

type DummyAttr

type DummyAttr bool // DummyAttr is a placeholder receiver's type in an RPC function

type FunctionHost

type FunctionHost struct {
	// contains filtered or unexported fields
}

FunctionHost hosts saptune daemon's RPC functions that are invoked by RPC client.

func NewFunctionHost

func NewFunctionHost() *FunctionHost

NewFunctionHost returns an initialised function host.

func (*FunctionHost) SetForceLatency

func (host *FunctionHost) SetForceLatency(newValue int, _ *DummyAttr) error

SetForceLatency starts a loop that manipulates cpu_dma_latency to match input value. If the loop is already started, the loop will be informed about the new value via a channel.

func (*FunctionHost) StopForceLatency

func (host *FunctionHost) StopForceLatency(_ DummyAttr, _ *DummyAttr) error

StopForceLatency stops the background loop that maintains cpu_dma_latency by closing its channel.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server is run by saptune system service to handle certain tuning parameters that require long-term maintenance.

func (*Server) Listen

func (srv *Server) Listen() (err error)

Listen establishes unix domain socket listener and starts RPC server.

func (*Server) MainLoop

func (srv *Server) MainLoop()

MainLoop accepts and handles incoming connections in a continuous loop. Blocks caller until listener closes.

func (*Server) Shutdown

func (srv *Server) Shutdown()

Shutdown closes server listener so that main loop (if running) will terminate.

Jump to

Keyboard shortcuts

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