- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 58 for Writer (0.19 sec)
-
cmd/erasure-encode.go
import ( "context" "fmt" "io" "sync" ) // Writes in parallel to writers type parallelWriter struct { writers []io.Writer writeQuorum int errs []error } // Write writes data to writers in parallel. func (p *parallelWriter) Write(ctx context.Context, blocks [][]byte) error { var wg sync.WaitGroup for i := range p.writers { if p.writers[i] == nil { p.errs[i] = errDiskNotFound continue
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Wed Jan 31 02:11:45 GMT 2024 - 3K bytes - Viewed (0) -
internal/ioutil/ioutil_test.go
} } func TestCloseOnWriter(t *testing.T) { writer := WriteOnClose(io.Discard) if writer.HasWritten() { t.Error("WriteOnCloser must not be marked as HasWritten") } writer.Write(nil) if !writer.HasWritten() { t.Error("WriteOnCloser must be marked as HasWritten") } writer = WriteOnClose(io.Discard) writer.Close() if !writer.HasWritten() { t.Error("WriteOnCloser must be marked as HasWritten")
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Feb 02 11:02:31 GMT 2024 - 5.1K bytes - Viewed (0) -
internal/lsync/lrwmutex_test.go
lrwm := NewLRWMutex() // fmt.Println("Getting initial write lock") if !lrwm.GetLock(ctx, "", "", time.Second) { panic("Failed to acquire initial write lock") } go func() { time.Sleep(2 * time.Second) lrwm.Unlock() // fmt.Println("Initial write lock released, waiting...") }() // fmt.Println("Trying to acquire 2nd write lock, waiting...") locked = lrwm.GetLock(ctx, "", "", duration)
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Sun Mar 05 04:57:35 GMT 2023 - 7.9K bytes - Viewed (0) -
internal/dsync/drwmutex_test.go
runtime.GOMAXPROCS(gomaxprocs) // Number of active readers + 10000 * number of active writers. var activity int32 cdone := make(chan bool) go writer(resource, numIterations, &activity, cdone) var i int for i = 0; i < numReaders/2; i++ { go reader(resource, numIterations, &activity, cdone) } go writer(resource, numIterations, &activity, cdone) for ; i < numReaders; i++ {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Sat Dec 24 03:49:07 GMT 2022 - 9.7K bytes - Viewed (0) -
docs/debugging/inspect/decrypt-v2.go
package main import ( "errors" "fmt" "io" "os" "github.com/minio/madmin-go/v3/estream" ) type keepFileErr struct { error } func extractInspectV2(pk []byte, r io.Reader, w io.Writer, okMsg string) error { privKey, err := bytesToPrivateKey(pk) if err != nil { return fmt.Errorf("decoding key returned: %w", err) } sr, err := estream.NewReader(r) if err != nil { return err }
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Thu Apr 11 21:22:47 GMT 2024 - 2.2K bytes - Viewed (0) -
cmd/main.go
for _, cmd := range closestCommands { console.Printf("\t‘%s’\n", cmd) } } os.Exit(1) } return app } func startupBanner(banner io.Writer) { CopyrightYear = strconv.Itoa(time.Now().Year()) fmt.Fprintln(banner, color.Blue("Copyright:")+color.Bold(" 2015-%s MinIO, Inc.", CopyrightYear)) fmt.Fprintln(banner, color.Blue("License:")+color.Bold(" "+MinioLicense))
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Sat Mar 09 03:07:08 GMT 2024 - 6.4K bytes - Viewed (0) -
cmd/bitrot-streaming.go
func newStreamingBitrotWriterBuffer(w io.Writer, algo BitrotAlgorithm, shardSize int64) io.Writer { return &streamingBitrotWriter{iow: ioutil.NopCloser(w), h: algo.New(), shardSize: shardSize, canClose: nil, closeWithErr: func(err error) error { // Similar to CloseWithError on pipes we always return nil. return nil }} } // Returns streaming bitrot writer implementation.
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Wed Jan 31 02:11:45 GMT 2024 - 5.8K bytes - Viewed (0) -
internal/s3select/json/record.go
func (r *Record) Raw() (sql.SelectObjectFormat, interface{}) { return r.SelectFormat, r.KVS } // WriteJSON - encodes to JSON data. func (r *Record) WriteJSON(writer io.Writer) error { return json.NewEncoder(writer).Encode(r.KVS) } // Replace the underlying buffer of json data. func (r *Record) Replace(k interface{}) error { v, ok := k.(jstream.KVS) if !ok {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Fri Feb 25 20:31:19 GMT 2022 - 5.2K bytes - Viewed (0) -
cmd/storage-interface.go
DeleteVol(ctx context.Context, volume string, forceDelete bool) (err error) // WalkDir will walk a directory on disk and return a metacache stream on wr. WalkDir(ctx context.Context, opts WalkDirOptions, wr io.Writer) error // Metadata operations DeleteVersion(ctx context.Context, volume, path string, fi FileInfo, forceDelMarker bool, opts DeleteOptions) error
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Apr 15 08:25:46 GMT 2024 - 4.9K bytes - Viewed (0) -
internal/s3select/csv/args.go
QuoteCharacter string `xml:"QuoteCharacter"` QuoteEscapeCharacter string `xml:"QuoteEscapeCharacter"` unmarshaled bool } // IsEmpty - returns whether writer args is empty or not. func (args *WriterArgs) IsEmpty() bool { return !args.unmarshaled } // UnmarshalXML - decodes XML data. func (args *WriterArgs) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
Go - Registered: Sun Apr 21 19:28:08 GMT 2024 - Last Modified: Mon Mar 06 16:56:10 GMT 2023 - 5.4K bytes - Viewed (0)