_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c20900
train
// HasChrootCapability checks if the current process has the CAP_SYS_CHROOT // capability
{ "resource": "" }
c20901
train
// LookupGid reads the group file specified by groupFile, and returns the gid of the group // specified by groupName.
{ "resource": "" }
c20902
train
// TryExclusiveLock takes an exclusive lock on the key without blocking. // lockDir is the directory where the lock file will be created. // It will return ErrLocked if any lock is already held.
{ "resource": "" }
c20903
train
// ExclusiveLock takes an exclusive lock on a key. // lockDir is the directory where the lock file will be created. // It will block if an exclusive lock is already held on the key.
{ "resource": "" }
c20904
train
// Unlock unlocks the key lock.
{ "resource": "" }
c20905
train
// CleanKeyLocks remove lock files from the lockDir. // For every key it tries to take an Exclusive lock on it and skip it if it // fails with ErrLocked
{ "resource": "" }
c20906
train
// GetPubKeyLocations discovers locations at prefix
{ "resource": "" }
c20907
train
// AddKeys adds the keys listed in pkls at prefix
{ "resource": "" }
c20908
train
// metaDiscoverPubKeyLocations discovers the locations of public keys through ACDiscovery by applying prefix as an ACApp
{ "resource": "" }
c20909
train
// downloadKey retrieves the file, storing it in a deleted tempfile
{ "resource": "" }
c20910
train
// displayKey shows the key summary
{ "resource": "" }
c20911
train
// reviewKey asks the user to accept the key
{ "resource": "" }
c20912
train
// setupTapDevice creates persistent tap device // and returns a newly created netlink.Link structure
{ "resource": "" }
c20913
train
// setupTapDevice creates persistent macvtap device // and returns a newly created netlink.Link structure // using part of pod hash and interface number in interface name
{ "resource": "" }
c20914
train
// kvmTeardown network teardown for kvm flavor based pods // similar to Networking.Teardown but without host namespaces
{ "resource": "" }
c20915
train
// Hash opens a file, optionally verifies it against passed asc, // stores it in the store and returns the hash.
{ "resource": "" }
c20916
train
// fetch opens and verifies the ACI.
{ "resource": "" }
c20917
train
// NewLoggingMounter returns a MountUnmounter that logs mount events using the given logger func.
{ "resource": "" }
c20918
train
// Extend extends the TPM log with the provided string. Returns any error.
{ "resource": "" }
c20919
train
// Stage1RootfsPath returns the path to the stage1 rootfs
{ "resource": "" }
c20920
train
// Stage1ManifestPath returns the path to the stage1's manifest file inside the expanded ACI.
{ "resource": "" }
c20921
train
// AppStatusPath returns the path of the status file of an app.
{ "resource": "" }
c20922
train
// AppStatusPathFromStage1Rootfs returns the path of the status file of an app. // It receives the stage1 rootfs as parameter instead of the pod root.
{ "resource": "" }
c20923
train
// AppPath returns the path to an app's rootfs.
{ "resource": "" }
c20924
train
// AppRootfsPath returns the path to an app's rootfs.
{ "resource": "" }
c20925
train
// RelAppPath returns the path of an app relative to the stage1 chroot.
{ "resource": "" }
c20926
train
// RelAppRootfsPath returns the path of an app's rootfs relative to the stage1 chroot.
{ "resource": "" }
c20927
train
// ImageManifestPath returns the path to the app's manifest file of a pod.
{ "resource": "" }
c20928
train
// AppInfoPath returns the path to the app's appsinfo directory of a pod.
{ "resource": "" }
c20929
train
// AppTreeStoreIDPath returns the path to the app's treeStoreID file of a pod.
{ "resource": "" }
c20930
train
// AppImageManifestPath returns the path to the app's ImageManifest file
{ "resource": "" }
c20931
train
// CreateSharedVolumesPath ensures the sharedVolumePath for the pod root passed // in exists. It returns the shared volume path or an error.
{ "resource": "" }
c20932
train
// MetadataServicePublicURL returns the public URL used to host the metadata service
{ "resource": "" }
c20933
train
// LookupPath search for bin in paths. If found, it returns its absolute path, // if not, an error
{ "resource": "" }
c20934
train
// SystemdVersion parses and returns the version of a given systemd binary
{ "resource": "" }
c20935
train
// SupportsOverlay returns whether the operating system generally supports OverlayFS, // returning an instance of ErrOverlayUnsupported which encodes the reason. // It is sufficient to check for nil if the reason is not of interest.
{ "resource": "" }
c20936
train
// RemoveEmptyLines removes empty lines from the given string // and breaks it up into a list of strings at newline characters
{ "resource": "" }
c20937
train
// GetExitStatus converts an error to an exit status. If it wasn't an exit // status != 0 it returns the same error that it was called with
{ "resource": "" }
c20938
train
// ImageNameToAppName converts the full name of image to an app name without special // characters - we use it as a default app name when specyfing it is optional
{ "resource": "" }
c20939
train
// GetNetworkDescriptions converts activeNets to netDescribers
{ "resource": "" }
c20940
train
// GetKVMNetArgs 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": "" }
c20941
train
// generateMacAddress returns net.HardwareAddr filled with fixed 3 byte prefix // complemented by 3 random bytes.
{ "resource": "" }
c20942
train
// replacePlaceholders replaces placeholders with values in kv in // initial str. Placeholders are in form of !!!FOO!!!, but those // passed here should be without exclamation marks.
{ "resource": "" }
c20943
train
// standardFlags returns a new flag set with target flag already set up
{ "resource": "" }
c20944
train
// Executes a given network plugin. If successful, mutates n.runtime with // the runtime information
{ "resource": "" }
c20945
train
// copyPod copies the immutable information of the pod into the new pod.
{ "resource": "" }
c20946
train
// copyImage copies the image object to avoid modification on the original one.
{ "resource": "" }
c20947
train
// GetInfo returns the information about the rkt, appc, api server version.
{ "resource": "" }
c20948
train
// containsAllKeyValues returns true if the actualKVs contains all of the key-value // pairs listed in requiredKVs, otherwise it returns false.
{ "resource": "" }
c20949
train
// satisfiesPodFilter returns true if the pod satisfies the filter. // The pod, filter must not be nil.
{ "resource": "" }
c20950
train
// satisfiesAnyPodFilters returns true if any of the filter conditions is satisfied // by the pod, or there's no filters.
{ "resource": "" }
c20951
train
// getApplist returns a list of apps in the pod.
{ "resource": "" }
c20952
train
// getNetworks returns the list of the info of the network that the pod belongs to.
{ "resource": "" }
c20953
train
// fillStaticAppInfo will modify the 'v1pod' in place with the information retrieved with 'pod'. // Today, these information are static and will not change during the pod's lifecycle.
{ "resource": "" }
c20954
train
// getBasicPod returns v1alpha.Pod with basic pod information.
{ "resource": "" }
c20955
train
// aciInfoToV1AlphaAPIImage takes an aciInfo object and construct the v1alpha.Image object.
{ "resource": "" }
c20956
train
// satisfiesImageFilter returns true if the image satisfies the filter. // The image, filter must not be nil.
{ "resource": "" }
c20957
train
// satisfiesAnyImageFilters returns true if any of the filter conditions is satisfied // by the image, or there's no filters.
{ "resource": "" }
c20958
train
// Open one or more listening sockets, then start the gRPC server
{ "resource": "" }
c20959
train
// WriteUnit writes a systemd unit in the given path with the given unit options // if no previous error occurred.
{ "resource": "" }
c20960
train
// writeShutdownService writes a shutdown.service unit with the given unit options // if no previous error occurred. // exec specifies how systemctl should be invoked, i.e. ExecStart, or ExecStop.
{ "resource": "" }
c20961
train
// Activate actives the given unit in the given wantPath.
{ "resource": "" }
c20962
train
// AppUnit sets up the main systemd service unit for the application.
{ "resource": "" }
c20963
train
// AppReaperUnit writes an app reaper service unit for the given app in the given path using the given unit options.
{ "resource": "" }
c20964
train
// AppSocketUnits writes a stream socket-unit for the given app in the given path.
{ "resource": "" }
c20965
train
// appendOptionsList updates an existing unit options list appending // an array of new properties, one entry at a time. // This is the preferred method to avoid hitting line length limits // in unit files. Target property must support multi-line entries.
{ "resource": "" }
c20966
train
// AppsForPod returns the apps of the pod with the given uuid in the given data directory. // If appName is non-empty, then only the app with the given name will be returned.
{ "resource": "" }
c20967
train
// newApp constructs the App object with the runtime app and pod manifest.
{ "resource": "" }
c20968
train
// appStateInImmutablePod infers most App state from the Pod itself, since all apps are created and destroyed with the Pod
{ "resource": "" }
c20969
train
// SaveRuntime persists just the runtime state. This should be called when the // pod is started.
{ "resource": "" }
c20970
train
// LoadPodManifest loads a Pod Manifest.
{ "resource": "" }
c20971
train
// FetchImages uses FetchImage to attain a list of image hashes
{ "resource": "" }
c20972
train
// FetchImage will take an image as either a path, a URL or a name // string and import it into the store if found. If ascPath is not "", // it must exist as a local file and will be used as the signature // file for verification, unless verification is disabled. If // f.WithDeps is true also image dependencies are fet...
{ "resource": "" }
c20973
train
// fetchImageDeps will recursively fetch all the image dependencies
{ "resource": "" }
c20974
train
// New creates a new Logger with no Log flags set.
{ "resource": "" }
c20975
train
// Error is a convenience function for printing errors without a message.
{ "resource": "" }
c20976
train
// Errorf is a convenience function for formatting and printing errors.
{ "resource": "" }
c20977
train
// PanicE prints a string and error then calls panic.
{ "resource": "" }
c20978
train
// Warn is just a shorter version of a formatted printing to // stderr. It appends a newline for you.
{ "resource": "" }
c20979
train
// MustAbs returns an absolute path. It works like filepath.Abs, but // panics if it fails.
{ "resource": "" }
c20980
train
// parseDuration converts the given string s to a duration value. // If it is empty string or a true boolean value according to strconv.ParseBool, a negative duration is returned. // If the boolean value is false, a 0 duration is returned. // If the string s is a duration value, then it is returned. // It returns an er...
{ "resource": "" }
c20981
train
// newContext returns a new context with timeout t if t > 0.
{ "resource": "" }
c20982
train
// getExitStatuses returns a map of the statuses of the pod.
{ "resource": "" }
c20983
train
// printStatus prints the pod's pid and per-app status codes
{ "resource": "" }
c20984
train
// ascURLFromImgURL creates a URL to a signature file from passed URL // to an image.
{ "resource": "" }
c20985
train
// printIdentities prints a message that signature was verified.
{ "resource": "" }
c20986
train
// DistFromImageString return the distribution for the given input image string
{ "resource": "" }
c20987
train
// parseCIMD parses the given url and returns a cimd.
{ "resource": "" }
c20988
train
// NewCIMDString creates a new cimd URL string.
{ "resource": "" }
c20989
train
// getApp returns the app to export // If one was supplied in the flags then it's returned if present // If the PM contains a single app, that app is returned // If the PM has multiple apps, the names are printed and an error is returned
{ "resource": "" }
c20990
train
// mountOverlay mounts the app from the overlay-rendered pod to the destination directory.
{ "resource": "" }
c20991
train
// buildAci builds a target aci from the root directory using any uid shift // information from uidRange.
{ "resource": "" }
c20992
train
// ensureSuperuser will error out if the effective UID of the current process // is not zero. Otherwise, it will invoke the supplied cobra command.
{ "resource": "" }
c20993
train
// generateSeccompFilter computes the concrete seccomp filter from the isolators
{ "resource": "" }
c20994
train
// seccompUnitOptions converts a concrete seccomp filter to systemd unit options
{ "resource": "" }
c20995
train
// parseLinuxSeccompSet gets an appc LinuxSeccompSet and returns an array // of values suitable for systemd SystemCallFilter.
{ "resource": "" }
c20996
train
// This is a multi-step entrypoint. It starts in stage0 context then invokes // itself again in stage1 context to perform further cleanup at pod level.
{ "resource": "" }
c20997
train
// cleanupStage1 is meant to be executed in stage1 context. It inspects pod systemd-pid1 mountinfo to // find all remaining mountpoints for appName and proceed to clean them up.
{ "resource": "" }
c20998
train
// renameExited renames exited pods to the exitedGarbage directory
{ "resource": "" }
c20999
train
// renameAborted renames failed prepares to the garbage directory
{ "resource": "" }