- staging/src/k8s.io/apiserver/pkg/server/options/admission.go:143
genericInitializer := initializer.New(clientset, informers, c.Authorization.Authorizer, scheme)- vendor/k8s.io/apiserver/pkg/admission/initializer/initializer.go:65
| package main | |
| import ( | |
| "bytes" | |
| "testing" | |
| "text/template" | |
| "github.com/stretchr/testify/require" | |
| ) |
| type CRDToWatchMapper { | |
| c *Controller | |
| } | |
| func (m *CRDToWatchMapper) Map(obj handler.MapObject) []reconcile.Request { | |
| crdGvk := extractGVKFromCRD(obj.Object) | |
| m.c.Watch( | |
| createSourceForGVK(crdGvk), | |
| &handler.EnqueueRequestsFromMapFunc{ToRequests: &SBRRequestMapper{}}, | |
| ) |
| apiVersion: shipper.booking.com/v1alpha1 | |
| kind: CapacityTarget | |
| metadata: | |
| creationTimestamp: 2019-02-12T15:43:39Z | |
| generation: 1 | |
| labels: | |
| shipper-app: reviews-api | |
| shipper-release: reviews-api-fba08f42-0 | |
| shipper-release-hash: fba08f42 |
genericInitializer := initializer.New(clientset, informers, c.Authorization.Authorizer, scheme)| package Server; | |
| sub process { | |
| my ( $check_name ) = @_; | |
| my $reactor = Reactor->new; | |
| my $callback = $server->callback_for( 'my_check' ); | |
| # Callback popula $reactor através da interface estipulada. |
| (defadvice gnus-summary-reply (after my-gnus-summary-reply (&optional yank wide very-wide)) | |
| "My gnus-summary-reply advice" | |
| (forward-visible-line 2)) | |
| (ad-activate 'gnus-summary-reply) |
| NSMutableDictionary *context = [NSMutableDictionary dictionary]; | |
| // Adds information in context under the key "fromOp1" | |
| Op1 *op1 = [[Op1 alloc] initWithContext:context]; | |
| // Consumes "fromOp1" from context and add info under the key "fromOp2" | |
| Op2 *op2 = [[Op2 alloc] initWithContext:context]; | |
| [op2 addDependency:op1]; |
| #import <Foundation/Foundation.h> | |
| int main(int argc, char *argv[]) { | |
| @autoreleasepool { | |
| NSArray *array = @[ | |
| @{@"name": @"Igor"}, | |
| @{@"name": @"Tom"}, | |
| @{@"name": @"Matt"}, | |
| @{@"name": @"Mike"} | |
| ]; |
| @interface MyWindow : UIWindow | |
| @end |
| typedef enum { | |
| LoginHandlerConnectionError, | |
| LoginHandlerInvalidCredentialsError, | |
| LoginHandlerUnknownError | |
| } LoginHandlerError; | |
| typedef enum { | |
| LoginHandlerDismissAction, | |
| LoginHandlerRetryAction | |
| } LoginHandlerAction; |