proxy

package
v0.0.0-...-8365721 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Client *rpc.Client

Client is the connection to rpc server

Functions

func ConnectRPCServer

func ConnectRPCServer(in PipePair) error

ConnectRPCServer by a pipe pair Be care about this method usage, it can only be called once while we start RMD API server, sync.once could be one choice, developer should control it.

func RegisterAndServe

func RegisterAndServe(pipes PipePair)

RegisterAndServe to register rpc and serve

Types

type PAMRequest

type PAMRequest struct {
	User string
	Pass string
}

PAMRequest is request from rpc client

type PipePair

type PipePair struct {
	Reader *os.File
	Writer *os.File
}

PipePair is a pair of pipe

func (*PipePair) Close

func (pp *PipePair) Close() error

Close the pipe pair

func (*PipePair) Read

func (pp *PipePair) Read(p []byte) (int, error)

Read from pipe pair's reader

func (*PipePair) Write

func (pp *PipePair) Write(p []byte) (int, error)

Write to pipe pair's writer

type Proxy

type Proxy struct {
}

Proxy struct of to rpc server

func (*Proxy) Commit

func (*Proxy) Commit(r Request, dummy *int) error

Commit resource group

func (*Proxy) DestroyResAssociation

func (*Proxy) DestroyResAssociation(grpName string, dummy *int) error

DestroyResAssociation remove resource association

func (*Proxy) EnableCat

func (*Proxy) EnableCat(dummy *int, result *bool) error

EnableCat mounts resctrl

func (*Proxy) PAMAuthenticate

func (*Proxy) PAMAuthenticate(request PAMRequest, dummy *int) error

PAMAuthenticate calls PAM authenticate

func (*Proxy) RemoveTasks

func (*Proxy) RemoveTasks(tasks []string, dummy *int) error

RemoveTasks move tasks to default group

type Request

type Request struct {
	Name string
	Res  resctrl.ResAssociation
}

Request struct of to rpc server

Jump to

Keyboard shortcuts

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