Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 57 for UnixNano (0.17 sec)

  1. internal/s3select/select_benchmark_test.go

    	humanize "github.com/dustin/go-humanize"
    )
    
    const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
    
    func newRandString(length int) string {
    	randSrc := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	b := make([]byte, length)
    	for i := range b {
    		b[i] = charset[randSrc.Intn(len(charset))]
    	}
    	return string(b)
    }
    
    func genSampleCSVData(count int) []byte {
    	buf := &bytes.Buffer{}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Apr 14 13:54:47 UTC 2022
    - 5K bytes
    - Viewed (0)
  2. schema/field.go

    				} else {
    					return err
    				}
    			case time.Time:
    				if field.AutoCreateTime == UnixNanosecond || field.AutoUpdateTime == UnixNanosecond {
    					field.ReflectValueOf(ctx, value).SetInt(data.UnixNano())
    				} else if field.AutoCreateTime == UnixMillisecond || field.AutoUpdateTime == UnixMillisecond {
    					field.ReflectValueOf(ctx, value).SetInt(data.UnixMilli())
    				} else {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Apr 15 03:20:20 UTC 2024
    - 32K bytes
    - Viewed (0)
  3. internal/grid/grid.go

    		if dial != nil {
    			dialer.NetDial = dial
    		}
    		header := make(http.Header, 2)
    		header.Set("Authorization", "Bearer "+auth())
    		header.Set("X-Minio-Time", strconv.FormatInt(time.Now().UnixNano(), 10))
    
    		if len(header) > 0 {
    			dialer.Header = ws.HandshakeHeaderHTTP(header)
    		}
    		dialer.TLSConfig = tls
    
    		conn, br, _, err := dialer.Dial(ctx, toDial)
    		if br != nil {
    			ws.PutReader(br)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  4. internal/lsync/lrwmutex.go

    // timing randomized back-off algorithm to try again until successful
    func (lm *LRWMutex) lockLoop(ctx context.Context, id, source string, timeout time.Duration, isWriteLock bool) (locked bool) {
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	retryCtx, cancel := context.WithTimeout(ctx, timeout)
    	defer cancel()
    
    	for {
    		select {
    		case <-retryCtx.Done():
    			// Caller context canceled or we timedout,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Jan 02 17:15:06 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  5. internal/grid/connection.go

    				atomic.StoreInt64(&c.LastPong, time.Now().UnixNano())
    				continue
    			}
    			toSend, err = pingFrame.MarshalMsg(GetByteBuffer()[:0])
    			if err != nil {
    				gridLogIf(ctx, err) // Fake it... Though this should never fail.
    				atomic.StoreInt64(&c.LastPong, time.Now().UnixNano())
    				continue
    			}
    		case toSend = <-c.outQueue:
    			if len(toSend) == 0 {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 46.7K bytes
    - Viewed (0)
  6. internal/logger/logrotate.go

    	xioutil "github.com/minio/minio/internal/ioutil"
    	"github.com/minio/pkg/v3/logger/message/log"
    )
    
    func defaultFilenameFunc() string {
    	return fmt.Sprintf("minio-%s.log", fmt.Sprintf("%X", time.Now().UTC().UnixNano()))
    }
    
    // Options define configuration options for Writer
    type Options struct {
    	// Directory defines the directory where log files will be written to.
    	// If the directory does not exist, it will be created.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  7. cmd/server-main.go

    		return
    	}
    
    	globalTrace.Publish(info)
    }
    
    func initServerConfig(ctx context.Context, newObject ObjectLayer) error {
    	t1 := time.Now()
    
    	r := rand.New(rand.NewSource(time.Now().UnixNano()))
    
    	for {
    		select {
    		case <-ctx.Done():
    			// Retry was canceled successfully.
    			return fmt.Errorf("Initializing sub-systems stopped gracefully %w", ctx.Err())
    		default:
    		}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Sep 24 21:50:11 UTC 2024
    - 35.2K bytes
    - Viewed (1)
  8. internal/event/target/mqtt.go

    func (target *MQTTTarget) initMQTT() error {
    	args := target.args
    
    	// Using hex here, to make sure we avoid 23
    	// character limit on client_id according to
    	// MQTT spec.
    	clientID := fmt.Sprintf("%x", time.Now().UnixNano())
    
    	options := mqtt.NewClientOptions().
    		SetClientID(clientID).
    		SetCleanSession(true).
    		SetUsername(args.User).
    		SetPassword(args.Password).
    		SetMaxReconnectInterval(args.MaxReconnectInterval).
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  9. cmd/xl-storage-format-v2.go

    			VersionID: uv,
    			ModTime:   fi.ModTime.UnixNano(),
    			MetaSys:   make(map[string][]byte),
    		}
    	} else {
    		ventry.Type = ObjectType
    		ventry.ObjectV2 = &xlMetaV2Object{
    			VersionID:          uv,
    			DataDir:            dd,
    			Size:               fi.Size,
    			ModTime:            fi.ModTime.UnixNano(),
    			ErasureAlgorithm:   ReedSolomon,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 22 15:30:50 UTC 2024
    - 64K bytes
    - Viewed (1)
  10. cmd/api-headers.go

    	xxml "github.com/minio/xxml"
    )
    
    // Returns a hexadecimal representation of time at the
    // time response is sent to the client.
    func mustGetRequestID(t time.Time) string {
    	return fmt.Sprintf("%X", t.UnixNano())
    }
    
    // setEventStreamHeaders to allow proxies to avoid buffering proxy responses
    func setEventStreamHeaders(w http.ResponseWriter) {
    	w.Header().Set(xhttp.ContentType, "text/event-stream")
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue May 28 04:44:00 UTC 2024
    - 7K bytes
    - Viewed (0)
Back to top