Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for defaultOnRead (0.12 sec)

  1. pkg/registry/core/service/storage/storage.go

    }
    type After struct {
    	*api.Service
    }
    
    // defaultOnRead sets interlinked fields that were not previously set on read.
    // We can't do this in the normal defaulting path because that same logic
    // applies on Get, Create, and Update, but we need to distinguish between them.
    //
    // This will be called on both Service and ServiceList types.
    func (r *REST) defaultOnRead(obj runtime.Object) {
    	switch s := obj.(type) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 11 13:09:33 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  2. pkg/registry/core/service/storage/storage_test.go

    			storage, _, server := newStorage(t, []api.IPFamily{api.IPv4Protocol, api.IPv6Protocol})
    			defer server.Terminate(t)
    			defer storage.Store.DestroyFunc()
    
    			tmp := tc.input.DeepCopyObject()
    			storage.defaultOnRead(tmp)
    
    			svc, ok := tmp.(*api.Service)
    			if !ok {
    				list, ok := tmp.(*api.ServiceList)
    				if !ok {
    					return
    				}
    				svc = &list.Items[0]
    			}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 440.2K bytes
    - Viewed (0)
Back to top