_id stringlengths 2 7 | title stringclasses 1
value | partition stringclasses 3
values | text stringlengths 6 2.61k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
c168400 | validation | // modulo returns the modulo of b from a. | {
"resource": ""
} | ||
c168401 | validation | // Returns true if the item has expired. | {
"resource": ""
} | ||
c168402 | validation | // Add an item to the cache, replacing any existing item, using the default
// expiration. | {
"resource": ""
} | ||
c168403 | validation | // Add an item to the cache only if an item doesn't already exist for the given
// key, or if the existing item has expired. Returns an error otherwise. | {
"resource": ""
} | ||
c168404 | validation | // Get an item from the cache. Returns the item or nil, and a bool indicating
// whether the key was found. | {
"resource": ""
} | ||
c168405 | validation | // Increment an item of type int by n. Returns an error if the item's value is
// not an int, or if it was not found. If there is no error, the incremented
// value is returned. | {
"resource": ""
} | ||
c168406 | validation | // Delete an item from the cache. Does nothing if the key is not in the cache. | {
"resource": ""
} | ||
c168407 | validation | // Delete all expired items from the cache. | {
"resource": ""
} | ||
c168408 | validation | // Copies all unexpired items in the cache into a new map and returns it. | {
"resource": ""
} | ||
c168409 | validation | // Returns the number of items in the cache. This may include items that have
// expired, but have not yet been cleaned up. | {
"resource": ""
} | ||
c168410 | validation | // Delete all items from the cache. | {
"resource": ""
} | ||
c168411 | validation | // djb2 with better shuffling. 5x faster than FNV with the hash.Hash overhead. | {
"resource": ""
} | ||
c168412 | validation | // LinkByName finds a link by name and returns a pointer to the object | {
"resource": ""
} | ||
c168413 | validation | // NewMockTaskEngine creates a new mock instance | {
"resource": ""
} | ||
c168414 | validation | // AddTask indicates an expected call of AddTask | {
"resource": ""
} | ||
c168415 | validation | // GetTaskByArn mocks base method | {
"resource": ""
} | ||
c168416 | validation | // ListTasks mocks base method | {
"resource": ""
} | ||
c168417 | validation | // MarshalJSON mocks base method | {
"resource": ""
} | ||
c168418 | validation | // MustInit mocks base method | {
"resource": ""
} | ||
c168419 | validation | // StateChangeEvents mocks base method | {
"resource": ""
} | ||
c168420 | validation | // NewMockImageManager creates a new mock instance | {
"resource": ""
} | ||
c168421 | validation | // AddAllImageStates mocks base method | {
"resource": ""
} | ||
c168422 | validation | // AddAllImageStates indicates an expected call of AddAllImageStates | {
"resource": ""
} | ||
c168423 | validation | // GetImageStateFromImageName mocks base method | {
"resource": ""
} | ||
c168424 | validation | // RecordContainerReference mocks base method | {
"resource": ""
} | ||
c168425 | validation | // StartImageCleanupProcess mocks base method | {
"resource": ""
} | ||
c168426 | validation | // NewEC2MetadataClient creates an ec2metadata client to retrieve metadata | {
"resource": ""
} | ||
c168427 | validation | // DefaultCredentials returns the credentials associated with the instance iam role | {
"resource": ""
} | ||
c168428 | validation | // GetDynamicData returns the dynamic data with provided path from instance metadata | {
"resource": ""
} | ||
c168429 | validation | // GetMetadata returns the metadata from instance metadata service specified by the path | {
"resource": ""
} | ||
c168430 | validation | // VPCID returns the VPC id for the network interface, given
// its mac address | {
"resource": ""
} | ||
c168431 | validation | // SubnetID returns the subnet id for the network interface,
// given its mac address | {
"resource": ""
} | ||
c168432 | validation | // newRefreshCredentialsHandler returns a new refreshCredentialsHandler object | {
"resource": ""
} | ||
c168433 | validation | // handlerFunc returns the request handler function for the ecsacs.IAMRoleCredentialsMessage | {
"resource": ""
} | ||
c168434 | validation | // ackMessageId sends an IAMRoleCredentialsAckRequest to the backend | {
"resource": ""
} | ||
c168435 | validation | // handleMessages processes refresh credentials messages in the buffer in-order | {
"resource": ""
} | ||
c168436 | validation | // handleSingleMessage processes a single refresh credentials message. | {
"resource": ""
} | ||
c168437 | validation | // validRoleType returns false if the RoleType in the acs refresh payload is not
// one of the expected types. TaskApplication, TaskExecution | {
"resource": ""
} | ||
c168438 | validation | // newPayloadRequestHandler returns a new payloadRequestHandler object | {
"resource": ""
} | ||
c168439 | validation | // handlerFunc returns the request handler function for the ecsacs.PayloadMessage type | {
"resource": ""
} | ||
c168440 | validation | // ackMessageId sends an AckRequest for a message id | {
"resource": ""
} | ||
c168441 | validation | // handleMessages processes payload messages in the payload message buffer in-order | {
"resource": ""
} | ||
c168442 | validation | // handleSingleMessage processes a single payload message. It adds tasks in the message to the task engine
// An error is returned if the message was not handled correctly. The error is being used only for testing
// today. In the future, it could be used for doing more interesting things. | {
"resource": ""
} | ||
c168443 | validation | // addPayloadTasks does validation on each task and, for all valid ones, adds
// it to the task engine. It returns a bool indicating if it could add every
// task to the taskEngine and a slice of credential ack requests | {
"resource": ""
} | ||
c168444 | validation | // addTasks adds the tasks to the task engine based on the skipAddTask condition
// This is used to add non-stopped tasks before adding stopped tasks | {
"resource": ""
} | ||
c168445 | validation | // handleUnrecognizedTask handles unrecognized tasks by sending 'stopped' with
// a suitable reason to the backend | {
"resource": ""
} | ||
c168446 | validation | // v2HandlersSetup adds all handlers in v2 package to the mux router. | {
"resource": ""
} | ||
c168447 | validation | // v3HandlersSetup adds all handlers in v3 package to the mux router. | {
"resource": ""
} | ||
c168448 | validation | // NewMockProvider creates a new mock instance | {
"resource": ""
} | ||
c168449 | validation | // IsExpired mocks base method | {
"resource": ""
} | ||
c168450 | validation | // IsExpired indicates an expected call of IsExpired | {
"resource": ""
} | ||
c168451 | validation | // Retrieve mocks base method | {
"resource": ""
} | ||
c168452 | validation | // NewMockContainerMetadataResolver creates a new mock instance | {
"resource": ""
} | ||
c168453 | validation | // ResolveContainer mocks base method | {
"resource": ""
} | ||
c168454 | validation | // ResolveContainer indicates an expected call of ResolveContainer | {
"resource": ""
} | ||
c168455 | validation | // ResolveTask mocks base method | {
"resource": ""
} | ||
c168456 | validation | // NewTaskResponse creates a new response object for the task | {
"resource": ""
} | ||
c168457 | validation | // NewContainerResponse creates a new container response based on container id | {
"resource": ""
} | ||
c168458 | validation | // New creates a new Args object from the argument list | {
"resource": ""
} | ||
c168459 | validation | // DefaultConfig returns the default configuration for Windows | {
"resource": ""
} | ||
c168460 | validation | // New returns an ECS httpClient with a roundtrip timeout of the given duration | {
"resource": ""
} | ||
c168461 | validation | // RemoveFromTaskArray removes the element at ndx from an array of task
// pointers, arr. If the ndx is out of bounds, it returns arr unchanged. | {
"resource": ""
} | ||
c168462 | validation | // adjustForPlatform makes Windows-specific changes to the task after unmarshal | {
"resource": ""
} | ||
c168463 | validation | // platformHostConfigOverride provides an entry point to set up default HostConfig options to be
// passed to Docker API. | {
"resource": ""
} | ||
c168464 | validation | // String return the string value of the eniattachment status | {
"resource": ""
} | ||
c168465 | validation | // return-based exit code so the 'defer' works | {
"resource": ""
} | ||
c168466 | validation | // RetryRules returns the correct time to delay between retries for this
// instance of a retry. For the first 14 requests, it follows an exponential
// backoff between 30ms and 1 minute.
// See the const comments for math on how this gets us to around 24 hours
// total. | {
"resource": ""
} | ||
c168467 | validation | // NewMockTime creates a new mock instance | {
"resource": ""
} | ||
c168468 | validation | // After mocks base method | {
"resource": ""
} | ||
c168469 | validation | // Now mocks base method | {
"resource": ""
} | ||
c168470 | validation | // Sleep mocks base method | {
"resource": ""
} | ||
c168471 | validation | // Sleep indicates an expected call of Sleep | {
"resource": ""
} | ||
c168472 | validation | // NewMockTimer creates a new mock instance | {
"resource": ""
} | ||
c168473 | validation | // Reset indicates an expected call of Reset | {
"resource": ""
} | ||
c168474 | validation | // Stop mocks base method | {
"resource": ""
} | ||
c168475 | validation | // Stop indicates an expected call of Stop | {
"resource": ""
} | ||
c168476 | validation | // AddAgentUpdateHandlers adds the needed update handlers to perform agent
// updates | {
"resource": ""
} | ||
c168477 | validation | // Returns the Docker SDK Client | {
"resource": ""
} | ||
c168478 | validation | // DockerStateToState converts the container status from docker to status recognized by the agent | {
"resource": ""
} | ||
c168479 | validation | // MetadataFromContainer translates dockerContainer into DockerContainerMetadata | {
"resource": ""
} | ||
c168480 | validation | // Listen to the docker event stream for container changes and pass them up | {
"resource": ""
} | ||
c168481 | validation | // ListContainers returns a slice of container IDs. | {
"resource": ""
} | ||
c168482 | validation | // ListPluginsWithFilters takes in filter arguments and returns the string of filtered Plugin names | {
"resource": ""
} | ||
c168483 | validation | // APIVersion returns the client api version | {
"resource": ""
} | ||
c168484 | validation | // LoadImage invokes loads an image from an input stream, with a specified timeout | {
"resource": ""
} | ||
c168485 | validation | // UpdateContainerReference updates container reference in image state | {
"resource": ""
} | ||
c168486 | validation | // AddImageName adds image name to image state | {
"resource": ""
} | ||
c168487 | validation | // GetImageNamesCount returns number of image names | {
"resource": ""
} | ||
c168488 | validation | // UpdateImageState updates image name and container reference in image state | {
"resource": ""
} | ||
c168489 | validation | // RemoveImageName removes image name from image state | {
"resource": ""
} | ||
c168490 | validation | // HasImageName returns true if image state contains the containerImageName | {
"resource": ""
} | ||
c168491 | validation | // RemoveContainerReference removes container reference from image state | {
"resource": ""
} | ||
c168492 | validation | // SetPullSucceeded sets the PullSucceeded of the imageState | {
"resource": ""
} | ||
c168493 | validation | // GetPullSucceeded safely returns the PullSucceeded of the imageState | {
"resource": ""
} | ||
c168494 | validation | // MarshalJSON marshals image state | {
"resource": ""
} | ||
c168495 | validation | // UnmarshalJSON overrides the logic for parsing the JSON-encoded TaskStatus data | {
"resource": ""
} | ||
c168496 | validation | // MarshalJSON overrides the logic for JSON-encoding the TaskStatus type | {
"resource": ""
} | ||
c168497 | validation | // NewClient creates a client of ecscni which is used to invoke the plugin | {
"resource": ""
} | ||
c168498 | validation | // SetupNS will set up the namespace of container, including create the bridge
// and the veth pair, move the eni to container namespace, setup the routes | {
"resource": ""
} | ||
c168499 | validation | // CleanupNS will clean up the container namespace, including remove the veth
// pair and stop the dhclient | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.