package ulimit

import "github.com/dotcloud/docker/pkg/ulimit"

Package ulimit provides structure and helper function to parse and represent resource limits (Rlimit and Ulimit, its human friendly version).

Index

Types

type Rlimit

type Rlimit struct {
	Type int    `json:"type,omitempty"`
	Hard uint64 `json:"hard,omitempty"`
	Soft uint64 `json:"soft,omitempty"`
}

Rlimit specifies the resource limits, such as max open files.

type Ulimit

type Ulimit struct {
	Name string
	Hard int64
	Soft int64
}

Ulimit is a human friendly version of Rlimit.

func Parse

func Parse(val string) (*Ulimit, error)

Parse parses and returns a Ulimit from the specified string.

func (*Ulimit) GetRlimit

func (u *Ulimit) GetRlimit() (*Rlimit, error)

GetRlimit returns the RLimit corresponding to Ulimit.

func (*Ulimit) String

func (u *Ulimit) String() string

Source Files

ulimit.go

Version
v1.9.0-rc3
Published
Oct 28, 2015
Platform
linux/amd64
Imports
3 packages
Last checked
2 minutes ago

Tools for package owners.