Search Options

Results per page
Sort
Preferred Languages
Advance

Results 471 - 480 of 1,179 for FUNC (0.04 sec)

  1. internal/handlers/proxy.go

    	protoRegex = regexp.MustCompile(`(?i)^(;|,| )+(?:proto=)(https|http)`)
    )
    
    // GetSourceScheme retrieves the scheme from the X-Forwarded-Proto and RFC7239
    // Forwarded headers (in that order).
    func GetSourceScheme(r *http.Request) string {
    	var scheme string
    
    	// Retrieve the scheme from X-Forwarded-Proto.
    	if proto := r.Header.Get(xForwardedProto); proto != "" {
    		scheme = strings.ToLower(proto)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Dec 22 00:56:55 UTC 2023
    - 5.1K bytes
    - Viewed (0)
  2. cmd/bucket-lifecycle_test.go

    import (
    	"bytes"
    	"net/http"
    	"testing"
    	"time"
    
    	"github.com/minio/minio/internal/bucket/lifecycle"
    	xhttp "github.com/minio/minio/internal/http"
    )
    
    // TestParseRestoreObjStatus tests parseRestoreObjStatus
    func TestParseRestoreObjStatus(t *testing.T) {
    	testCases := []struct {
    		restoreHdr     string
    		expectedStatus restoreObjStatus
    		expectedErr    error
    	}{
    		{
    			// valid: represents a restored object, 'pending' expiry.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 31 09:57:57 UTC 2022
    - 7K bytes
    - Viewed (0)
  3. cmd/storage-datatypes_gen.go

    				return
    			}
    		}
    	}
    	return
    }
    
    // EncodeMsg implements msgp.Encodable
    func (z BaseOptions) EncodeMsg(en *msgp.Writer) (err error) {
    	// map header, size 0
    	_ = z
    	err = en.Append(0x80)
    	if err != nil {
    		return
    	}
    	return
    }
    
    // MarshalMsg implements msgp.Marshaler
    func (z BaseOptions) MarshalMsg(b []byte) (o []byte, err error) {
    	o = msgp.Require(b, z.Msgsize())
    	// map header, size 0
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 150.2K bytes
    - Viewed (0)
  4. internal/bpool/bpool.go

    func (bp *BytePoolCap) Width() (n int) {
    	if bp == nil {
    		return 0
    	}
    	return bp.w
    }
    
    // WidthCap returns the cap width of the byte arrays in this pool.
    func (bp *BytePoolCap) WidthCap() (n int) {
    	if bp == nil {
    		return 0
    	}
    	return bp.wcap
    }
    
    // CurrentSize returns current size of buffer pool
    func (bp *BytePoolCap) CurrentSize() int {
    	if bp == nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 29 01:40:52 UTC 2024
    - 3K bytes
    - Viewed (0)
  5. cmd/endpoint_contrib_test.go

     */
    
    package cmd
    
    import (
    	"testing"
    
    	"github.com/minio/minio-go/v7/pkg/set"
    )
    
    func TestUpdateDomainIPs(t *testing.T) {
    	tempGlobalMinioPort := globalMinioPort
    	defer func() {
    		globalMinioPort = tempGlobalMinioPort
    	}()
    	globalMinioPort = "9000"
    
    	tempGlobalDomainIPs := globalDomainIPs
    	defer func() {
    		globalDomainIPs = tempGlobalDomainIPs
    	}()
    
    	ipv4TestCases := []struct {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Apr 30 15:50:39 UTC 2021
    - 2.2K bytes
    - Viewed (0)
  6. internal/disk/directio_darwin.go

    const ODirectPlatform = true
    
    // OpenFileDirectIO - bypass kernel cache.
    func OpenFileDirectIO(filePath string, flag int, perm os.FileMode) (*os.File, error) {
    	return directio.OpenFile(filePath, flag, perm)
    }
    
    // DisableDirectIO - disables directio mode.
    func DisableDirectIO(f *os.File) error {
    	fd := f.Fd()
    	_, err := unix.FcntlInt(fd, unix.F_NOCACHE, 0)
    	return err
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Jun 17 14:31:36 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  7. internal/config/etcd/etcd.go

    	}
    
    	return etcdEndpoints, etcdSecure, nil
    }
    
    // Enabled returns if etcd is enabled.
    func Enabled(kvs config.KVS) bool {
    	endpoints := kvs.Get(Endpoints)
    	return endpoints != ""
    }
    
    // LookupConfig - Initialize new etcd config.
    func LookupConfig(kvs config.KVS, rootCAs *x509.CertPool) (Config, error) {
    	cfg := Config{}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 28 23:17:22 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  8. clause/update_test.go

    package clause_test
    
    import (
    	"fmt"
    	"testing"
    
    	"gorm.io/gorm/clause"
    )
    
    func TestUpdate(t *testing.T) {
    	results := []struct {
    		Clauses []clause.Interface
    		Result  string
    		Vars    []interface{}
    	}{
    		{
    			[]clause.Interface{clause.Update{}},
    			"UPDATE `users`", nil,
    		},
    		{
    			[]clause.Interface{clause.Update{Modifier: "LOW_PRIORITY"}},
    			"UPDATE LOW_PRIORITY `users`", nil,
    		},
    		{
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Jun 02 01:18:01 UTC 2020
    - 722 bytes
    - Viewed (0)
  9. internal/http/listener_test.go

    	"testing"
    	"time"
    
    	"github.com/minio/minio-go/v7/pkg/set"
    )
    
    var serverPort uint32 = 60000
    
    var getCert = func(*tls.ClientHelloInfo) (*tls.Certificate, error) {
    	certificate, err := getTLSCert()
    	if err != nil {
    		return nil, err
    	}
    	return &certificate, nil
    }
    
    func getTLSCert() (tls.Certificate, error) {
    	keyPEMBlock := []byte(`-----BEGIN RSA PRIVATE KEY-----
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jun 10 17:41:02 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  10. utils/tests/utils.go

    		}
    		got := rv.FieldByName(name).Interface()
    		expect := ev.FieldByName(name).Interface()
    		t.Run(name, func(t *testing.T) {
    			AssertEqual(t, got, expect)
    		})
    	}
    }
    
    func AssertEqual(t *testing.T, got, expect interface{}) {
    	if !reflect.DeepEqual(got, expect) {
    		isEqual := func() {
    			if curTime, ok := got.(time.Time); ok {
    				format := "2006-01-02T15:04:05Z07:00"
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Mar 10 09:21:56 UTC 2023
    - 3.9K bytes
    - Viewed (0)
Back to top