- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 790 for store (0.03 sec)
-
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) -
internal/store/batch_test.go
if err := tearDownQueueStore(); err != nil { t.Fatalf("Failed to tear down store; %v", err) } }() store, err := setUpQueueStore(queueDir, 100) if err != nil { t.Fatalf("Failed to create a queue store; %v", err) } var limit uint32 = 100 batch := NewBatch[TestItem](BatchConfig[TestItem]{ Limit: limit, Store: store, CommitTimeout: 5 * time.Minute,
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 5.6K bytes - Viewed (0) -
internal/event/target/nats.go
return nil, fmt.Errorf("unable to initialize the queue store of NATS `%s`: %w", id, err) } } target := &NATSTarget{ id: event.TargetID{ID: id, Name: "nats"}, 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 - 12.9K bytes - Viewed (0) -
cmd/iam.go
} loadUserCalled := false select { case <-sys.configLoaded: default: sys.store.LoadUser(ctx, name) loadUserCalled = true } userInfo, err := sys.store.GetUserInfo(name) if err == errNoSuchUser && !loadUserCalled { sys.store.LoadUser(ctx, name) userInfo, err = sys.store.GetUserInfo(name) } return userInfo, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Oct 29 16:01:48 UTC 2024 - 74.6K bytes - Viewed (0) -
internal/event/target/kafka.go
if target.store != nil { if args.BatchSize > 1 { target.batch = store.NewBatch[event.Event](store.BatchConfig[event.Event]{ Limit: args.BatchSize, Log: loggerOnce, Store: queueStore, CommitTimeout: args.BatchCommitTimeout, }) } store.StreamItems(target.store, target, target.quitCh, target.loggerOnce) } return target, nil }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 13.6K bytes - Viewed (0) -
internal/event/target/webhook.go
} return target.isActive() } // Store returns any underlying store if set. func (target *WebhookTarget) Store() event.TargetStore { return target.store } func (target *WebhookTarget) isActive() (bool, error) { conn, err := net.DialTimeout("tcp", target.addr, 5*time.Second) if err != nil { if xnet.IsNetworkOrHostDown(err, false) { return false, store.ErrNotConnected } return false, err }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.8K bytes - Viewed (0) -
internal/event/target/redis.go
// Name - returns the Name of the target. func (target *RedisTarget) Name() string { return target.ID().String() } // Store returns any underlying store if set. func (target *RedisTarget) Store() event.TargetStore { return target.store } // IsActive - Return true if target is up and active func (target *RedisTarget) 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 - 9.1K bytes - Viewed (0) -
internal/event/target/elasticsearch.go
func (target *ElasticsearchTarget) Name() string { return target.ID().String() } // Store returns any underlying store if set. func (target *ElasticsearchTarget) Store() event.TargetStore { return target.store } // IsActive - Return true if target is up and active func (target *ElasticsearchTarget) 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 - 15K bytes - Viewed (0) -
internal/logger/target/http/http.go
queueStore := store.NewQueueStore[interface{}]( filepath.Join(h.config.QueueDir, h.Name()), uint64(h.config.QueueSize), httpLoggerExtension, ) if err := queueStore.Open(); err != nil { return fmt.Errorf("unable to initialize the queue store of %s webhook: %w", h.Name(), err) } h.store = queueStore store.StreamItems(h.store, h, ctx.Done(), h.config.LogOnceIf) return nil
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Sep 11 22:20:42 UTC 2024 - 15.6K bytes - Viewed (0) -
internal/event/target/postgresql.go
} // Name - returns the Name of the target. func (target *PostgreSQLTarget) Name() string { return target.ID().String() } // Store returns any underlying store if set. func (target *PostgreSQLTarget) Store() event.TargetStore { return target.store } // IsActive - Return true if target is up and active func (target *PostgreSQLTarget) IsActive() (bool, error) { if err := target.init(); err != nil {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 13.3K bytes - Viewed (0)