Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 95 for interfaces (0.2 sec)

  1. internal/store/batch.go

    package store
    
    import (
    	"errors"
    	"fmt"
    	"sync"
    )
    
    // ErrBatchFull indicates that the batch is full
    var ErrBatchFull = errors.New("batch is full")
    
    type key interface {
    	string | int | int64
    }
    
    // Batch represents an ordered batch
    type Batch[K key, T any] struct {
    	keys  []K
    	items map[K]T
    	limit uint32
    
    	sync.Mutex
    }
    
    // Add adds the item to the batch
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 2.5K bytes
    - Viewed (0)
  2. internal/logger/target/testlogger/testlogger.go

    func (t *testLogger) IsOnline(ctx context.Context) bool {
    	return t.current.Load() != nil
    }
    
    func (t *testLogger) Cancel() {
    	t.current.Store(nil)
    }
    
    func (t *testLogger) Send(ctx context.Context, entry interface{}) error {
    	tb := t.current.Load()
    	var logf func(format string, args ...any)
    	if tb != nil {
    		tbb := *tb
    		tbb.Helper()
    		switch t.action.Load() {
    		case errorMessage:
    			logf = tbb.Errorf
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Nov 21 01:09:35 GMT 2023
    - 4K bytes
    - Viewed (0)
  3. internal/auth/credentials_test.go

    package auth
    
    import (
    	"encoding/json"
    	"testing"
    	"time"
    )
    
    func TestExpToInt64(t *testing.T) {
    	testCases := []struct {
    		exp             interface{}
    		expectedFailure bool
    	}{
    		{"", true},
    		{"-1", true},
    		{"1574812326", false},
    		{1574812326, false},
    		{int64(1574812326), false},
    		{int(1574812326), false},
    		{uint(1574812326), false},
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  4. internal/crypto/sse.go

    	// is not optimal. See: https://github.com/minio/minio/pull/6121
    	InsecureSealAlgorithm = "DARE-SHA256"
    )
    
    // Type represents an AWS SSE type:
    //   - SSE-C
    //   - SSE-S3
    //   - SSE-KMS
    type Type interface {
    	fmt.Stringer
    
    	IsRequested(http.Header) bool
    	IsEncrypted(map[string]string) bool
    }
    
    // IsRequested returns true and the SSE Type if the HTTP headers
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 30 15:26:43 GMT 2022
    - 4.4K bytes
    - Viewed (0)
  5. internal/logger/target/console/console.go

    // Endpoint returns the backend endpoint
    func (c *Target) Endpoint() string {
    	return ""
    }
    
    func (c *Target) String() string {
    	return "console"
    }
    
    // Send log message 'e' to console
    func (c *Target) Send(e interface{}) error {
    	entry, ok := e.(log.Entry)
    	if !ok {
    		return fmt.Errorf("Uexpected log entry structure %#v", e)
    	}
    	if logger.IsJSON() {
    		logJSON, err := json.Marshal(&entry)
    		if err != nil {
    			return err
    		}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 17:57:52 GMT 2024
    - 3.9K bytes
    - Viewed (0)
  6. internal/lsync/lrwmutex.go

    func (lm *LRWMutex) ForceUnlock() {
    	lm.mu.Lock()
    	defer lm.mu.Unlock()
    
    	lm.ref = 0
    	lm.isWriteLock = false
    }
    
    // DRLocker returns a sync.Locker interface that implements
    // the Lock and Unlock methods by calling drw.RLock and drw.RUnlock.
    func (lm *LRWMutex) DRLocker() sync.Locker {
    	return (*drlocker)(lm)
    }
    
    type drlocker LRWMutex
    
    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)
  7. internal/config/policy/opa/config.go

    func (o *Opa) IsAllowed(args policy.Args) (bool, error) {
    	if o == nil {
    		return false, nil
    	}
    
    	// OPA input
    	body := make(map[string]interface{})
    	body["input"] = args
    
    	inputBytes, err := json.Marshal(body)
    	if err != nil {
    		return false, err
    	}
    
    	req, err := http.NewRequest(http.MethodPost, o.args.URL.String(), bytes.NewReader(inputBytes))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Sep 14 21:50:16 GMT 2023
    - 5.2K bytes
    - Viewed (1)
  8. docs/sts/web-identity.go

    		bucketNames := []string{}
    
    		for _, bucket := range buckets {
    			log.Println(fmt.Sprintf("Bucket discovered: %s", bucket.Name))
    			bucketNames = append(bucketNames, bucket.Name)
    		}
    		response := make(map[string]interface{})
    		response["credentials"] = creds
    		response["buckets"] = bucketNames
    		c, err := json.MarshalIndent(response, "", "\t")
    		if err != nil {
    			http.Error(w, err.Error(), http.StatusInternalServerError)
    			return
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 19 09:13:33 GMT 2023
    - 7.8K bytes
    - Viewed (3)
  9. internal/event/target/mqtt.go

    	// Do not send if the connection is not active.
    	_, err := target.isActive()
    	if err != nil {
    		return err
    	}
    
    	return target.send(eventData)
    }
    
    // Close - does nothing and available for interface compatibility.
    func (target *MQTTTarget) Close() error {
    	if target.client != nil {
    		target.client.Disconnect(100)
    	}
    	close(target.quitCh)
    	return nil
    }
    
    func (target *MQTTTarget) init() error {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Oct 07 15:07:38 GMT 2023
    - 8.2K bytes
    - Viewed (0)
  10. internal/s3select/sql/jsonpath_test.go

    	)
    	cases := []struct {
    		str string
    		res []interface{}
    	}{
    		{"s.title", []interface{}{"Murder on the Orient Express", "The Robots of Dawn", "Pigs Have Wings"}},
    		{"s.authorInfo.yearRange", []interface{}{[]interface{}{1890.0, 1976.0}, []interface{}{1920.0, 1992.0}, []interface{}{1881.0, 1975.0}}},
    		{"s.authorInfo.name", []interface{}{"Agatha Christie", "Isaac Asimov", "P. G. Wodehouse"}},
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 2.8K bytes
    - Viewed (0)
Back to top