_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c21000 | train | // renameExpired renames expired prepared pods to the garbage directory | {
"resource": ""
} | ||
c21001 | train | // deletePod cleans up files and resource associated with the pod
// pod must be under exclusive lock and be in either ExitedGarbage
// or Garbage state | {
"resource": ""
} | ||
c21002 | train | // backupDB backs up current database. | {
"resource": ""
} | ||
c21003 | train | // ResolveName resolves an image name to a list of full keys and using the
// store for resolution. | {
"resource": ""
} | ||
c21004 | train | // RemoveACI removes the ACI with the given key. It firstly removes the aci
// infos inside the db, then it tries to remove the non transactional data.
// If some error occurs removing some non transactional data a
// StoreRemovalError is returned. | {
"resource": ""
} | ||
c21005 | train | // GetRemote tries to retrieve a remote with the given ACIURL.
// If remote doesn't exist, it returns ErrRemoteNotFound error. | {
"resource": ""
} | ||
c21006 | train | // GetImageManifestJSON gets the ImageManifest JSON bytes with the
// specified key. | {
"resource": ""
} | ||
c21007 | train | // GetImageManifest gets the ImageManifest with the specified key. | {
"resource": ""
} | ||
c21008 | train | // HasFullKey returns whether the image with the given key exists on the disk by
// checking if the image manifest kv store contains the key. | {
"resource": ""
} | ||
c21009 | train | // keyToString takes a key and returns a shortened and prefixed hexadecimal string version | {
"resource": ""
} | ||
c21010 | train | // Download tries to fetch the passed URL and write the contents into
// a given writeSyncer instance. | {
"resource": ""
} | ||
c21011 | train | // getAppName returns the app name to enter
// If one was supplied in the flags then it's simply returned
// If the PM contains a single app, that app's name is returned
// If the PM has multiple apps, the names are printed and an error is returned | {
"resource": ""
} | ||
c21012 | train | // getEnterArgv returns the argv to use for entering the pod | {
"resource": ""
} | ||
c21013 | train | // mountFsRO remounts the given mountPoint using the given flags read-only. | {
"resource": ""
} | ||
c21014 | train | // GetEnabledCgroups returns a map with the enabled cgroup controllers grouped by
// hierarchy | {
"resource": ""
} | ||
c21015 | train | // GetOwnCgroupPath returns the cgroup path of this process in controller
// hierarchy | {
"resource": ""
} | ||
c21016 | train | // GetCgroupPathByPid returns the cgroup path of the process with the given pid
// and given controller. | {
"resource": ""
} | ||
c21017 | train | // JoinSubcgroup makes the calling process join the subcgroup hierarchy on a
// particular controller | {
"resource": ""
} | ||
c21018 | train | // IsControllerMounted returns whether a controller is mounted by checking that
// cgroup.procs is accessible | {
"resource": ""
} | ||
c21019 | train | // Returns a nil slice and nil error if the xattr is not set | {
"resource": ""
} | ||
c21020 | train | // GetDeviceInfo returns the type, major, and minor numbers of a device.
// Kind is 'b' or 'c' for block and character devices, respectively.
// This does not follow symlinks. | {
"resource": ""
} | ||
c21021 | train | // Parse the device info out of the mode bits. Separate for testability. | {
"resource": ""
} | ||
c21022 | train | // IsIsolatorSupported returns whether an isolator is supported in the kernel | {
"resource": ""
} | ||
c21023 | train | // CreateBackup backs a directory up in a given directory. It basically
// copies this directory into a given backups directory. The backups
// directory has a simple structure - a directory inside named "0" is
// the most recent backup. A directory name for oldest backup is
// deduced from a given limit. For instance,... | {
"resource": ""
} | ||
c21024 | train | // pruneOldBackups removes old backups, that is - directories with
// names greater or equal than given limit. | {
"resource": ""
} | ||
c21025 | train | // shiftBackups renames all directories with names being numbers up to
// oldest to names with numbers greater by one. | {
"resource": ""
} | ||
c21026 | train | // NewBasicACI creates a new ACI in the given directory with the given name.
// Used for testing. | {
"resource": ""
} | ||
c21027 | train | // NewACI creates a new ACI in the given directory with the given image
// manifest and entries.
// Used for testing. | {
"resource": ""
} | ||
c21028 | train | // NewDetachedSignature creates a new openpgp armored detached signature for the given ACI
// signed with armoredPrivateKey. | {
"resource": ""
} | ||
c21029 | train | // SandboxManifest loads the underlying pod manifest and checks whether mutable operations are allowed.
// It returns ErrImmutable if the pod does not allow mutable operations or any other error if the operation failed.
// Upon success a reference to the pod manifest is returned and mutable operations are possible. | {
"resource": ""
} | ||
c21030 | train | // UpdateManifest updates the given pod manifest in the given path atomically on the file system.
// The pod manifest has to be locked using LockManifest first to avoid races in case of concurrent writes. | {
"resource": ""
} | ||
c21031 | train | // ExclusiveLockManifest gets an exclusive lock on only the pod manifest in the app sandbox.
// Since the pod might already be running, we can't just get an exclusive lock on the pod itself. | {
"resource": ""
} | ||
c21032 | train | // UnlockManifest unlocks the pod manifest lock. | {
"resource": ""
} | ||
c21033 | train | // getDBVersion retrieves the current db version | {
"resource": ""
} | ||
c21034 | train | // updateDBVersion updates the db version | {
"resource": ""
} | ||
c21035 | train | // InitACL dlopens libacl and returns an ACL object if successful. | {
"resource": ""
} | ||
c21036 | train | // ParseACL parses a string representation of an ACL. | {
"resource": ""
} | ||
c21037 | train | // Free frees libacl's internal structures and closes libacl. | {
"resource": ""
} | ||
c21038 | train | // SetFileACLDefault sets the "default" ACL for path. | {
"resource": ""
} | ||
c21039 | train | // Valid checks whether the ACL is valid. | {
"resource": ""
} | ||
c21040 | train | // AddBaseEntries adds the base ACL entries from the file permissions. | {
"resource": ""
} | ||
c21041 | train | // NewAppc returns an Appc distribution from an Appc distribution URI | {
"resource": ""
} | ||
c21042 | train | // NewAppcFromApp returns an Appc distribution from an appc App discovery string | {
"resource": ""
} | ||
c21043 | train | // CloseOnExec sets or clears FD_CLOEXEC flag on a file descriptor | {
"resource": ""
} | ||
c21044 | train | // GetEnabledControllers returns a list of enabled cgroup controllers | {
"resource": ""
} | ||
c21045 | train | // globGetArgs parses given parameters and returns a target, a suffix
// and a list of files. | {
"resource": ""
} | ||
c21046 | train | // globGetMakeFunction returns a make snippet which calls wildcard
// function in all directories where given files are and with a given
// suffix. | {
"resource": ""
} | ||
c21047 | train | // WaitFinished waits for a pod to finish by polling every 100 milliseconds
// or until the given context is cancelled. This method refreshes the pod state.
// It is the caller's responsibility to determine the actual terminal state. | {
"resource": ""
} | ||
c21048 | train | // WaitReady blocks until the pod is ready by polling the readiness state every 100 milliseconds
// or until the given context is cancelled. This method refreshes the pod state. | {
"resource": ""
} | ||
c21049 | train | // retry calls function f indefinitely with the given delay between invocations
// until f returns true or the given context is cancelled.
// It returns immediately without delay in case function f immediately returns true. | {
"resource": ""
} | ||
c21050 | train | // DirSize takes a path and returns its size in bytes | {
"resource": ""
} | ||
c21051 | train | // IsDeviceNode checks if the given path points to a block or char device.
// It doesn't follow symlinks. | {
"resource": ""
} | ||
c21052 | train | // StartCmd takes path to stage1, UUID of the pod, path to kernel, network
// describers, memory in megabytes and quantity of cpus and prepares command
// line to run LKVM process | {
"resource": ""
} | ||
c21053 | train | // kvmNetArgs returns additional arguments that need to be passed
// to lkvm tool to configure networks properly. Logic is based on
// network configuration extracted from Networking struct
// and essentially from activeNets that expose NetDescriber behavior | {
"resource": ""
} | ||
c21054 | train | // NewOptionList initializes an OptionList. PermissibleOptions is the complete
// set of allowable options. It will set all options specified in defaultOptions
// as provided; they will all be cleared if this flag is passed in the CLI | {
"resource": ""
} | ||
c21055 | train | // gcTreeStore removes all treeStoreIDs not referenced by any non garbage
// collected pod from the store. | {
"resource": ""
} | ||
c21056 | train | // getRunningImages will return the image IDs used to create any of the
// currently running pods | {
"resource": ""
} | ||
c21057 | train | // deduplicateMPs removes Mounts with duplicated paths. If there's more than
// one Mount with the same path, it keeps the first one encountered. | {
"resource": ""
} | ||
c21058 | train | // MergeMounts combines the global and per-app mount slices | {
"resource": ""
} | ||
c21059 | train | // Prepare sets up a pod based on the given config. | {
"resource": ""
} | ||
c21060 | train | // setupAppImage mounts the overlay filesystem for the app image that
// corresponds to the given hash if useOverlay is true.
// It also creates an mtab file in the application's rootfs if one is not
// present. | {
"resource": ""
} | ||
c21061 | train | // prepareStage1Image renders and verifies tree cache of the given hash
// when using overlay.
// When useOverlay is false, it attempts to render and expand the stage1. | {
"resource": ""
} | ||
c21062 | train | // setupStage1Image mounts the overlay filesystem for stage1.
// When useOverlay is false it is a noop | {
"resource": ""
} | ||
c21063 | train | // writeManifest takes an img ID and writes the corresponding manifest in dest | {
"resource": ""
} | ||
c21064 | train | // copyAppManifest copies to saved image manifest for the given appName and
// writes it in the dest directory. | {
"resource": ""
} | ||
c21065 | train | // overlayRender renders the image that corresponds to the given hash using the
// overlay filesystem. It mounts an overlay filesystem from the cached tree of
// the image as rootfs. | {
"resource": ""
} | ||
c21066 | train | // prepateOverlay sets up the needed directories, files and permissions for the
// overlay-rendered pods | {
"resource": ""
} | ||
c21067 | train | // NewStore creates a Store for managing filesystem trees, including the dependency graph resolution of the underlying image layers. | {
"resource": ""
} | ||
c21068 | train | // GetID calculates the treestore ID for the given image key.
// The treeStoreID is computed as an hash of the flattened dependency tree
// image keys. In this way the ID may change for the same key if the image's
// dependencies change. | {
"resource": ""
} | ||
c21069 | train | // Render renders a treestore for the given image key if it's not
// already fully rendered.
// Users of treestore should call s.Render before using it to ensure
// that the treestore is completely rendered.
// Returns the id and hash of the rendered treestore if it is newly rendered,
// and only the id if it is alread... | {
"resource": ""
} | ||
c21070 | train | // Check verifies the treestore consistency for the specified id. | {
"resource": ""
} | ||
c21071 | train | // Remove removes the rendered image in tree store with the given id. | {
"resource": ""
} | ||
c21072 | train | // remove cleans the directory for the provided id | {
"resource": ""
} | ||
c21073 | train | // IsRendered checks if the tree store with the provided id is fully rendered | {
"resource": ""
} | ||
c21074 | train | // Hash calculates an hash of the rendered ACI. It uses the same functions
// used to create a tar but instead of writing the full archive is just
// computes the sha512 sum of the file infos and contents. | {
"resource": ""
} | ||
c21075 | train | // check calculates the actual rendered ACI's hash and verifies that it matches
// the saved value. Returns the calculated hash. | {
"resource": ""
} | ||
c21076 | train | // Size returns the size of the rootfs for the provided id. It is a relatively
// expensive operation, it goes through all the files and adds up their size. | {
"resource": ""
} | ||
c21077 | train | // GetImageHash returns the hash of the image that uses the tree store
// identified by id. | {
"resource": ""
} | ||
c21078 | train | // HasPrefix returns a FilterFunc which returns true if
// the mountpoint of a given mount has prefix p, else false. | {
"resource": ""
} | ||
c21079 | train | // ParseMounts returns all mountpoints associated with a process mount namespace.
// The special value 0 as pid argument is used to specify the current process. | {
"resource": ""
} | ||
c21080 | train | // findResources finds value of last isolator for particular type. | {
"resource": ""
} | ||
c21081 | train | // wrapStructLevelFunc wraps normal StructLevelFunc makes it compatible with StructLevelFuncCtx | {
"resource": ""
} | ||
c21082 | train | // ExtractType gets the actual underlying type of field value. | {
"resource": ""
} | ||
c21083 | train | // ReportError reports an error just by passing the field and tag information | {
"resource": ""
} | ||
c21084 | train | // ValidateValuer implements validator.CustomTypeFunc | {
"resource": ""
} | ||
c21085 | train | // Error returns InvalidValidationError message | {
"resource": ""
} | ||
c21086 | train | // Error is intended for use in development + debugging and not intended to be a production error message.
// It allows ValidationErrors to subscribe to the Error interface.
// All information to create an error message specific to your application is contained within
// the FieldError found within the ValidationErrors... | {
"resource": ""
} | ||
c21087 | train | // Translate translates all of the ValidationErrors | {
"resource": ""
} | ||
c21088 | train | // Field returns the fields name with the tag name taking precedence over the
// fields actual name. | {
"resource": ""
} | ||
c21089 | train | // returns the fields actual name from the struct, when able to determine. | {
"resource": ""
} | ||
c21090 | train | // Error returns the fieldError's error message | {
"resource": ""
} | ||
c21091 | train | // NotBlank is the validation function for validating if the current field
// has a value or length greater than zero, or is not a space only string. | {
"resource": ""
} | ||
c21092 | train | // wrapFunc wraps noramal Func makes it compatible with FuncCtx | {
"resource": ""
} | ||
c21093 | train | // isUnique is the validation function for validating if each array|slice|map value is unique | {
"resource": ""
} | ||
c21094 | train | // IsMAC is the validation function for validating if the field's value is a valid MAC address. | {
"resource": ""
} | ||
c21095 | train | // IsCIDRv4 is the validation function for validating if the field's value is a valid v4 CIDR address. | {
"resource": ""
} | ||
c21096 | train | // IsCIDR is the validation function for validating if the field's value is a valid v4 or v6 CIDR address. | {
"resource": ""
} | ||
c21097 | train | // IsIPv6 is the validation function for validating if the field's value is a valid v6 IP address. | {
"resource": ""
} | ||
c21098 | train | // IsIP is the validation function for validating if the field's value is a valid v4 or v6 IP address. | {
"resource": ""
} | ||
c21099 | train | // IsSSN is the validation function for validating if the field's value is a valid SSN. | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.