Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 264 for Write (0.15 sec)

  1. internal/dsync/dsync-server_test.go

    	}
    	if reply = locksHeld == WriteLock; !reply { // Unless it is a write lock
    		return false, fmt.Errorf("Unlock attempted on a read locked entity: %s (%d read locks active)", args.Resources[0], locksHeld)
    	}
    	delete(l.lockMap, args.Resources[0]) // Remove the write lock
    	return true, nil
    }
    
    const ReadLock = 1
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Jan 23 16:46:37 GMT 2023
    - 8.3K bytes
    - Viewed (0)
  2. cmd/bitrot_test.go

    	writer := newBitrotWriter(disk, "", volume, filePath, 35, bitrotAlgo, 10)
    
    	_, err = writer.Write([]byte("aaaaaaaaaa"))
    	if err != nil {
    		t.Fatal(err)
    	}
    	_, err = writer.Write([]byte("aaaaaaaaaa"))
    	if err != nil {
    		t.Fatal(err)
    	}
    	_, err = writer.Write([]byte("aaaaaaaaaa"))
    	if err != nil {
    		t.Fatal(err)
    	}
    	_, err = writer.Write([]byte("aaaaa"))
    	if err != nil {
    		t.Fatal(err)
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. internal/logger/logrotate.go

    	f *os.File
    
    	pw *xioutil.PipeWriter
    	pr *xioutil.PipeReader
    }
    
    // Write writes p into the current file, rotating if necessary.
    // Write is non-blocking, if the writer's queue is not full.
    // Write is blocking otherwise.
    func (w *Writer) Write(p []byte) (n int, err error) {
    	return w.pw.Write(p)
    }
    
    // Close closes the writer.
    // Any accepted writes will be flushed. Any new writes will be rejected.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 11:38:40 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  4. internal/lsync/lrwmutex.go

    func NewLRWMutex() *LRWMutex {
    	return &LRWMutex{}
    }
    
    // Lock holds a write lock on lm.
    //
    // If the lock is already in use, the calling go routine
    // blocks until the mutex is available.
    func (lm *LRWMutex) Lock() {
    	const isWriteLock = true
    	lm.lockLoop(context.Background(), lm.id, lm.source, math.MaxInt64, isWriteLock)
    }
    
    // GetLock tries to get a write lock on lm before the timeout occurs.
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  5. istioctl/pkg/writer/compare/sds/writer.go

    func (w *sdsWriter) printSecretItemsJSON(secrets []SecretItem) error {
    	out, err := json.MarshalIndent(secrets, "", " ")
    	if err != nil {
    		return err
    	}
    
    	_, err = w.w.Write(out)
    	if err != nil {
    		return err
    	}
    
    	return nil
    }
    
    // PrintDiffs uses the user supplied output format to determine how to display the diffed secrets
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Fri Apr 21 14:17:23 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  6. cmd/benchmark-utils_test.go

    			mustGetPutObjReader(b, bytes.NewReader(textData), int64(len(textData)), md5hex, sha256hex), ObjectOptions{})
    		if err != nil {
    			b.Fatal(err)
    		}
    		if objInfo.ETag != md5hex {
    			b.Fatalf("Write no: %d: Md5Sum mismatch during object write into the bucket: Expected %s, got %s", i+1, objInfo.ETag, md5hex)
    		}
    	}
    	// Benchmark ends here. Stop timer.
    	b.StopTimer()
    }
    
    // Benchmark utility functions for ObjectLayer.PutObjectPart().
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Dec 23 15:46:00 GMT 2022
    - 8.2K bytes
    - Viewed (0)
  7. src/archive/zip/example_test.go

    // license that can be found in the LICENSE file.
    
    package zip_test
    
    import (
    	"archive/zip"
    	"bytes"
    	"compress/flate"
    	"fmt"
    	"io"
    	"log"
    	"os"
    )
    
    func ExampleWriter() {
    	// Create a buffer to write our archive to.
    	buf := new(bytes.Buffer)
    
    	// Create a new zip archive.
    	w := zip.NewWriter(buf)
    
    	// Add some files to the archive.
    	var files = []struct {
    		Name, Body string
    	}{
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 27 00:22:03 GMT 2016
    - 2K bytes
    - Viewed (0)
  8. internal/bucket/bandwidth/monitor_gen.go

    				err = msgp.WrapError(err)
    				return
    			}
    		}
    	}
    	return
    }
    
    // EncodeMsg implements msgp.Encodable
    func (z Details) EncodeMsg(en *msgp.Writer) (err error) {
    	// map header, size 2
    	// write "LimitInBytesPerSecond"
    	err = en.Append(0x82, 0xb5, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x50, 0x65, 0x72, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64)
    	if err != nil {
    		return
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 21 17:21:35 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  9. istioctl/pkg/admin/istiodconfig_test.go

    	switch request.Method {
    	case http.MethodGet:
    		_, _ = writer.Write([]byte(getResponse))
    	}
    }
    
    func adsHandler(writer http.ResponseWriter, request *http.Request) {
    	const getResponse = `{"name":"ads","description":"ads debugging","output_level":"info","stack_trace_level":"none","log_callers":false}`
    
    	switch request.Method {
    	case http.MethodGet:
    		_, _ = writer.Write([]byte(getResponse))
    	}
    }
    
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Thu Jun 15 15:02:17 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  10. cmd/metacache-set_gen.go

    func (z *listPathOptions) EncodeMsg(en *msgp.Writer) (err error) {
    	// map header, size 19
    	// write "ID"
    	err = en.Append(0xde, 0x0, 0x13, 0xa2, 0x49, 0x44)
    	if err != nil {
    		return
    	}
    	err = en.WriteString(z.ID)
    	if err != nil {
    		err = msgp.WrapError(err, "ID")
    		return
    	}
    	// write "Bucket"
    	err = en.Append(0xa6, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74)
    	if err != nil {
    		return
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Mar 19 20:23:12 GMT 2024
    - 13.8K bytes
    - Viewed (0)
Back to top