jail

package
v0.0.0-...-869d168 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryCache

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

BinaryCache holds the path to compiled binaries

func NewBinaryCache

func NewBinaryCache() *BinaryCache

NewBinaryCache creates a new value of type BinaryCache pointer. This stores a URL as the key and a path to the compiled binary as the value

func (*BinaryCache) Get

func (b *BinaryCache) Get(k string) string

Get takes a key as an argument and gets the associated value if it exists

func (*BinaryCache) Set

func (b *BinaryCache) Set(k, v string)

Set takes a key and a value and sets them in the cache

type JLS

type JLS struct {
	Host      string `json:"host"`
	IP4       string `json:"ip4"`
	IP6       string `json:"ip6"`
	JID       int    `json:"jid"`
	Name      string `json:"name"`
	OSRelease string `json:"OSRelease"`
	Path      string `json:"path"`
	Hostname  string `json:"hostname"`
}

JLS holds the Go represented output from the jls command

func JLSRun

func JLSRun(w utils.Wrapper) ([]*JLS, error)

JLSRun runs the jls command to get a slice of the running jails

type JailServicer

type JailServicer interface {
	InitializeSystem() error
	CreateJail(string, bool) error
	RemoveJail(string) error
	KillJail(int) error
	JailDetails(int) (*JLS, error)
}

JailServicer defines the behavior of the Jail service

func NewJailService

func NewJailService(conf *config.Config, l gklog.Logger, m *statsd.Client, w utils.Wrapper) JailServicer

NewJailService creates a new value of type jailService pointer

type NetworkServicer

type NetworkServicer interface {
	Allocate([]byte) (string, error)
	Pool() map[string][]byte
	UpdateIPState(string, []byte) error
}

NetworkServicer defines the behavior of the IP service

func NewNetworkService

func NewNetworkService(conf *config.Config, l gklog.Logger, metrics *statsd.Client) (NetworkServicer, error)

NewNetworkService creates a new value of type networkService pointer

type RepoServicer

type RepoServicer interface {
	CloneRepo(jpath, fname string) error
	RemoveRepo(repo string) error
}

RepoServicer

func NewRepoService

func NewRepoService(conf *config.Config, l gklog.Logger, metrics *statsd.Client) RepoServicer

newRepoService

Jump to

Keyboard shortcuts

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