Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for binaryFetcher (0.26 sec)

  1. pkg/wasm/imagefetcher_test.go

    		if err != nil {
    			t.Fatal(err)
    		}
    
    		// Fetch OCI image.
    		binaryFetcher, actualDiget, err := fetcher.PrepareFetch(ref)
    		if err != nil {
    			t.Fatal(err)
    		}
    		actual, err := binaryFetcher()
    		if err != nil {
    			t.Fatal(err)
    		}
    		if string(actual) != exp {
    			t.Errorf("ImageFetcher.binaryFetcher got %s, but want '%s'", string(actual), exp)
    		}
    		if actualDiget != d.Hex {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Feb 05 04:15:17 UTC 2023
    - 16.3K bytes
    - Viewed (0)
  2. pkg/wasm/cache.go

    		return nil, fmt.Errorf("module downloaded from %v has checksum %v, which does not match: %v", key.downloadURL, dChecksum, key.checksum)
    	}
    
    	if binaryFetcher != nil {
    		b, err = binaryFetcher()
    		if err != nil {
    			wasmRemoteFetchCount.With(resultTag.Value(downloadFailure)).Increment()
    			return nil, fmt.Errorf("could not fetch Wasm binary: %v", err)
    		}
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  3. pkg/wasm/imagefetcher.go

    // Wasm binary is not fetched immediately, but returned by `binaryFetcher` function, which is returned by PrepareFetch.
    // By this way, we can have another chance to check cache with `actualDigest` without downloading the OCI image.
    func (o *ImageFetcher) PrepareFetch(url string) (binaryFetcher func() ([]byte, error), actualDigest string, err error) {
    	ref, err := name.ParseReference(url)
    	if err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sun Dec 10 05:44:51 UTC 2023
    - 12K bytes
    - Viewed (0)
Back to top