- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for ItemCount (0.11 sec)
-
internal/store/queuestore_test.go
t.Fatalf("expected len(keys)=1, but found %d", len(keys)) } key := keys[0] if !key.Compress { t.Fatal("expected the item to be compressed") } if key.ItemCount != 10 { t.Fatalf("expected itemcount=10 but found %v", key.ItemCount) } resultItems, err := store.GetMultiple(key) if err != nil { t.Fatalf("unable to get multiple items; %v", err) } if !reflect.DeepEqual(resultItems, items) {
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.7K bytes - Viewed (0) -
internal/store/store_test.go
t.Fatalf("case[%v]: Expected key.Extension: %v, got %v", i, testCase.expectedKey.Extension, key.Extension) } if testCase.expectedKey.ItemCount != key.ItemCount { t.Fatalf("case[%v]: Expected key.ItemCount: %v, got %v", i, testCase.expectedKey.ItemCount, key.ItemCount) } if testCase.expectedKey.String() != key.String() {
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 4K bytes - Viewed (0) -
internal/store/batch_test.go
t.Fatalf("expected len(store.List())=1; but got %v", len(keys)) } key := keys[0] if !key.Compress { t.Fatal("expected key.Compress=true; but got false") } if key.ItemCount != int(limit) { t.Fatalf("expected key.ItemCount=%d; but got %v", limit, key.ItemCount) } items, err := store.GetMultiple(key) if err != nil { t.Fatalf("unable to read key %v; %v", key.String(), err) } if len(items) != int(limit) {
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 5.6K bytes - Viewed (0) -
internal/store/store.go
} // Key denotes the key present in the store. type Key struct { Name string Compress bool Extension string ItemCount int } // String returns the filepath name func (k Key) String() string { keyStr := k.Name if k.ItemCount > 1 { keyStr = fmt.Sprintf("%d:%s", k.ItemCount, k.Name) } return keyStr + k.Extension + func() string { if k.Compress { return compressExt } return "" }()
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 4.2K bytes - Viewed (0) -
internal/store/queuestore.go
return Key{}, err } store.Lock() defer store.Unlock() if uint64(len(store.entries)) >= store.entryLimit { return Key{}, errLimitExceeded } key := Key{ Name: uid.String(), ItemCount: len(items), Compress: true, Extension: store.fileExt, } return key, store.multiWrite(key, items) } // multiWrite - writes an item to the directory.
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 8.6K bytes - Viewed (0) -
internal/event/target/kafka.go
// SendFromStore - reads an event from store and sends it to Kafka. func (target *KafkaTarget) SendFromStore(key store.Key) (err error) { if err = target.init(); err != nil { return err } switch { case key.ItemCount == 1: var event event.Event event, err = target.store.Get(key) if err != nil { // The last event key in a successful batch will be sent in the channel atmost once by the replayEvents()
Registered: Sun Oct 27 19:28:09 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 13.6K bytes - Viewed (0)