Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 620 for store (0.04 sec)

  1. internal/store/store.go

    	return
    }
    
    // replayItems - Reads the items from the store and replays.
    func replayItems[I any](store Store[I], doneCh <-chan struct{}, log logger, id string) <-chan Key {
    	keyCh := make(chan Key)
    
    	go func() {
    		defer xioutil.SafeClose(keyCh)
    
    		retryTicker := time.NewTicker(retryInterval)
    		defer retryTicker.Stop()
    
    		for {
    			for _, key := range store.List() {
    				select {
    				case keyCh <- key:
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. cmd/iam-store.go

    func (store *IAMStoreSys) ListGroups(ctx context.Context) (res []string, err error) {
    	cache := store.lock()
    	defer store.unlock()
    
    	return store.updateGroups(ctx, cache)
    }
    
    // listGroups - lists groups - fetch groups from cache
    func (store *IAMStoreSys) listGroups(ctx context.Context) (res []string, err error) {
    	cache := store.rlock()
    	defer store.runlock()
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Oct 14 16:35:37 UTC 2024
    - 83.2K bytes
    - Viewed (0)
  3. cmd/iam-object-store.go

    		logger.Info("IAM expired STS purge took %.2fs", took)
    	}
    
    	// Store the newly populated map in the iam cache. This takes care of
    	// removing stale entries from the existing map.
    	cache.iamSTSAccountsMap = stsAccountsFromStore
    
    	stsAccPoliciesFromStore.Range(func(k string, v MappedPolicy) bool {
    		cache.iamSTSPolicyMap.Store(k, v)
    		return true
    	})
    
    	return nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 10 23:40:37 UTC 2024
    - 26.6K bytes
    - Viewed (0)
  4. cmd/iam-etcd-store.go

    	var p MappedPolicy
    	err := ies.loadIAMConfig(ctx, &p, getMappedPolicyPath(name, userType, isGroup))
    	if err != nil {
    		if err == errConfigNotFound {
    			return errNoSuchPolicy
    		}
    		return err
    	}
    	m.Store(name, p)
    	return nil
    }
    
    func getMappedPolicy(kv *mvccpb.KeyValue, m *xsync.MapOf[string, MappedPolicy], basePrefix string) error {
    	var p MappedPolicy
    	err := getIAMConfig(&p, kv.Value, string(kv.Key))
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 01:29:20 UTC 2024
    - 14K bytes
    - Viewed (0)
  5. internal/event/target/nsq.go

    			return nil, fmt.Errorf("unable to initialize the queue store of NSQ `%s`: %w", id, err)
    		}
    	}
    
    	target := &NSQTarget{
    		id:         event.TargetID{ID: id, Name: "nsq"},
    		args:       args,
    		loggerOnce: loggerOnce,
    		store:      queueStore,
    		quitCh:     make(chan struct{}),
    	}
    
    	if target.store != nil {
    		store.StreamItems(target.store, target, target.quitCh, target.loggerOnce)
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  6. internal/event/target/mysql.go

    // Name - returns the Name of the target.
    func (target *MySQLTarget) Name() string {
    	return target.ID().String()
    }
    
    // Store returns any underlying store if set.
    func (target *MySQLTarget) Store() event.TargetStore {
    	return target.store
    }
    
    // IsActive - Return true if target is up and active
    func (target *MySQLTarget) IsActive() (bool, error) {
    	if err := target.init(); err != nil {
    		return false, err
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  7. internal/store/queuestore.go

    	return
    }
    
    // Del - Deletes an entry from the store.
    func (store *QueueStore[_]) Del(key Key) error {
    	store.Lock()
    	defer store.Unlock()
    	return store.del(key)
    }
    
    // Len returns the entry count.
    func (store *QueueStore[_]) Len() int {
    	store.RLock()
    	l := len(store.entries)
    	defer store.RUnlock()
    	return l
    }
    
    // lockless call
    func (store *QueueStore[_]) del(key Key) error {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  8. internal/store/queuestore_test.go

    	}
    	// Put 10 items
    	for i := 0; i < 10; i++ {
    		if _, err := store.Put(testItem); err != nil {
    			t.Fatal("Failed to put to queue store ", err)
    		}
    	}
    	itemKeys := store.List()
    	// Get 10 items.
    	if len(itemKeys) == 10 {
    		for _, key := range itemKeys {
    			item, eErr := store.Get(key)
    			if eErr != nil {
    				t.Fatal("Failed to Get the item from the queue store ", eErr)
    			}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. internal/event/target/mqtt.go

    	}
    
    	// Delete the event from store.
    	return target.store.Del(key)
    }
    
    // Save - saves the events to the store if queuestore is configured, which will
    // be replayed when the mqtt connection is active.
    func (target *MQTTTarget) Save(eventData event.Event) error {
    	if target.store != nil {
    		_, err := target.store.Put(eventData)
    		return err
    	}
    	if err := target.init(); err != nil {
    		return err
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  10. internal/store/batch.go

    type BatchConfig[I any] struct {
    	Limit         uint32
    	Store         Store[I]
    	CommitTimeout time.Duration
    	Log           logger
    }
    
    // Add adds the item to the batch
    func (b *Batch[I]) Add(item I) error {
    	b.Lock()
    	defer b.Unlock()
    
    	if b.isFull() {
    		if b.store == nil {
    			return ErrBatchFull
    		}
    		// commit batch to store
    		if err := b.commit(); err != nil {
    			return err
    		}
    	}
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top