Search Options

Results per page
Sort
Preferred Languages
Advance

Results 711 - 720 of 1,179 for _func (0.04 sec)

  1. internal/event/target/amqp.go

    func (target *AMQPTarget) IsActive() (bool, error) {
    	if err := target.init(); err != nil {
    		return false, err
    	}
    
    	return target.isActive()
    }
    
    func (target *AMQPTarget) isActive() (bool, error) {
    	ch, _, err := target.channel()
    	if err != nil {
    		return false, err
    	}
    	defer func() {
    		ch.Close()
    	}()
    	return true, nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 10K bytes
    - Viewed (0)
  2. internal/store/queuestore_test.go

    	testItemExt = ".test"
    )
    
    // Initialize the queue store.
    func setUpQueueStore(directory string, limit uint64) (Store[TestItem], error) {
    	queueStore := NewQueueStore[TestItem](queueDir, limit, testItemExt)
    	if oErr := queueStore.Open(); oErr != nil {
    		return nil, oErr
    	}
    	return queueStore, nil
    }
    
    // Tear down queue store.
    func tearDownQueueStore() error {
    	return os.RemoveAll(queueDir)
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  3. cmd/object-handlers-common_test.go

    package cmd
    
    import (
    	"bytes"
    	"context"
    	"net/http"
    	"net/http/httptest"
    	"testing"
    	"time"
    
    	xhttp "github.com/minio/minio/internal/http"
    )
    
    // Tests - canonicalizeETag()
    func TestCanonicalizeETag(t *testing.T) {
    	testCases := []struct {
    		etag              string
    		canonicalizedETag string
    	}{
    		{
    			etag:              "\"\"\"",
    			canonicalizedETag: "",
    		},
    		{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 03 06:33:53 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  4. cmd/xl-storage_test.go

    	}
    
    	for _, testCase := range testCases {
    		gotErr := checkPathLength(testCase.path)
    		t.Run("", func(t *testing.T) {
    			if gotErr != testCase.expectedErr {
    				t.Errorf("Expected %s, got %s", testCase.expectedErr, gotErr)
    			}
    		})
    	}
    }
    
    // Tests validate volume name.
    func TestIsValidVolname(t *testing.T) {
    	testCases := []struct {
    		volName    string
    		shouldPass bool
    	}{
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 14 17:11:51 UTC 2024
    - 66.7K bytes
    - Viewed (0)
  5. cmd/mrf_gen_test.go

    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after Skip(): %q", len(left), left)
    	}
    }
    
    func BenchmarkMarshalMsgPartialOperation(b *testing.B) {
    	v := PartialOperation{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsgPartialOperation(b *testing.B) {
    	v := PartialOperation{}
    	bts := make([]byte, 0, v.Msgsize())
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Aug 13 22:26:05 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  6. cmd/tier_gen_test.go

    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after Skip(): %q", len(left), left)
    	}
    }
    
    func BenchmarkMarshalMsgTierConfigMgr(b *testing.B) {
    	v := TierConfigMgr{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsgTierConfigMgr(b *testing.B) {
    	v := TierConfigMgr{}
    	bts := make([]byte, 0, v.Msgsize())
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 23 18:58:53 UTC 2021
    - 2.3K bytes
    - Viewed (0)
  7. cmd/metacache-set_gen_test.go

    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after Skip(): %q", len(left), left)
    	}
    }
    
    func BenchmarkMarshalMsglistPathOptions(b *testing.B) {
    	v := listPathOptions{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsglistPathOptions(b *testing.B) {
    	v := listPathOptions{}
    	bts := make([]byte, 0, v.Msgsize())
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Feb 19 22:54:46 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  8. cmd/metacache-walk_gen_test.go

    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after Skip(): %q", len(left), left)
    	}
    }
    
    func BenchmarkMarshalMsgWalkDirOptions(b *testing.B) {
    	v := WalkDirOptions{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsgWalkDirOptions(b *testing.B) {
    	v := WalkDirOptions{}
    	bts := make([]byte, 0, v.Msgsize())
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Nov 21 01:09:35 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  9. cmd/site-replication-utils_gen_test.go

    		t.Fatal(err)
    	}
    	if len(left) > 0 {
    		t.Errorf("%d bytes left over after Skip(): %q", len(left), left)
    	}
    }
    
    func BenchmarkMarshalMsgSiteResyncStatus(b *testing.B) {
    	v := SiteResyncStatus{}
    	b.ReportAllocs()
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		v.MarshalMsg(nil)
    	}
    }
    
    func BenchmarkAppendMsgSiteResyncStatus(b *testing.B) {
    	v := SiteResyncStatus{}
    	bts := make([]byte, 0, v.Msgsize())
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Nov 14 15:16:40 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  10. internal/logger/audit.go

    // SetAuditEntry sets Audit info in the context.
    func SetAuditEntry(ctx context.Context, audit *audit.Entry) context.Context {
    	if ctx == nil {
    		LogIf(context.Background(), "audit", fmt.Errorf("context is nil"))
    		return nil
    	}
    	return context.WithValue(ctx, contextAuditKey, audit)
    }
    
    // GetAuditEntry returns Audit entry if set.
    func GetAuditEntry(ctx context.Context) *audit.Entry {
    	if ctx != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 17:13:00 UTC 2024
    - 4.6K bytes
    - Viewed (0)
Back to top