Documentation
¶
Index ¶
- func CheckMongoURLs(providedMongoUrls string, expectedMongoNodeCount int) error
- func Hash(payload []byte) (string, error)
- type Content
- type DB
- type DBIter
- type InMemoryCollectionBuilder
- type InMemoryUUIDCollection
- type MockDB
- type MockDBIter
- type MockReader
- type MockTX
- func (t *MockTX) Close()
- func (t *MockTX) FindUUIDs(collectionID string, skip int, batchsize int) (DBIter, int, error)
- func (t *MockTX) FindUUIDsInTimeWindow(collectionID string, start time.Time, end time.Time, batchsize int) (DBIter, int, error)
- func (t *MockTX) Ping(ctx context.Context) error
- func (t *MockTX) ReadNativeContent(collectionID string, uuid string) (*Content, error)
- type MockUUIDCollection
- type MongoDB
- type MongoReader
- type MongoTX
- func (tx *MongoTX) Close()
- func (tx *MongoTX) FindUUIDs(collectionID string, skip int, batchsize int) (DBIter, int, error)
- func (tx *MongoTX) FindUUIDsInTimeWindow(collectionID string, start time.Time, end time.Time, batchsize int) (DBIter, int, error)
- func (tx *MongoTX) Ping(ctx context.Context) error
- func (tx *MongoTX) ReadNativeContent(collectionID string, uuid string) (*Content, error)
- type NativeUUIDCollection
- type NativeUUIDCollectionBuilder
- type Reader
- type TX
- type UUIDCollection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckMongoURLs ¶ added in v0.2.12
Types ¶
type InMemoryCollectionBuilder ¶ added in v0.2.12
type InMemoryCollectionBuilder struct {
// contains filtered or unexported fields
}
func NewInMemoryCollectionBuilder ¶ added in v0.2.12
func NewInMemoryCollectionBuilder(s3ReadWriter s3.ReadWriter) *InMemoryCollectionBuilder
func (*InMemoryCollectionBuilder) LoadIntoMemory ¶ added in v0.2.12
func (b *InMemoryCollectionBuilder) LoadIntoMemory(ctx context.Context, uuidCollection UUIDCollection, collection string, skip int, blist blacklist.IsBlacklisted) (UUIDCollection, error)
type InMemoryUUIDCollection ¶ added in v0.2.12
type InMemoryUUIDCollection struct {
// contains filtered or unexported fields
}
func (*InMemoryUUIDCollection) Close ¶ added in v0.2.12
func (i *InMemoryUUIDCollection) Close() error
func (*InMemoryUUIDCollection) Done ¶ added in v0.2.12
func (i *InMemoryUUIDCollection) Done() bool
func (*InMemoryUUIDCollection) Length ¶ added in v0.2.12
func (i *InMemoryUUIDCollection) Length() int
type MockDBIter ¶
func (*MockDBIter) Close ¶
func (m *MockDBIter) Close() error
func (*MockDBIter) Done ¶
func (m *MockDBIter) Done() bool
func (*MockDBIter) Err ¶
func (m *MockDBIter) Err() error
func (*MockDBIter) Next ¶
func (m *MockDBIter) Next(result interface{}) bool
func (*MockDBIter) Timeout ¶
func (m *MockDBIter) Timeout() bool
type MockReader ¶
type MockUUIDCollection ¶ added in v0.2.12
func (*MockUUIDCollection) Close ¶ added in v0.2.12
func (m *MockUUIDCollection) Close() error
func (*MockUUIDCollection) Done ¶ added in v0.2.12
func (m *MockUUIDCollection) Done() bool
func (*MockUUIDCollection) Length ¶ added in v0.2.12
func (m *MockUUIDCollection) Length() int
type MongoReader ¶
type MongoReader struct {
// contains filtered or unexported fields
}
type MongoTX ¶
type MongoTX struct {
// contains filtered or unexported fields
}
MongoTX wraps a mongo session
func (*MongoTX) FindUUIDs ¶
FindUUIDs returns all uuids for a collection sorted by lastodified date, if no lastmodified exists records are returned at the end of the list
func (*MongoTX) FindUUIDsInTimeWindow ¶
func (tx *MongoTX) FindUUIDsInTimeWindow(collectionID string, start time.Time, end time.Time, batchsize int) (DBIter, int, error)
FindUUIDsInTimeWindow queries mongo for a list of uuids and returns an iterator
type NativeUUIDCollection ¶
type NativeUUIDCollection struct {
// contains filtered or unexported fields
}
func (*NativeUUIDCollection) Close ¶
func (n *NativeUUIDCollection) Close() error
func (*NativeUUIDCollection) Done ¶
func (n *NativeUUIDCollection) Done() bool
func (*NativeUUIDCollection) Length ¶
func (n *NativeUUIDCollection) Length() int
type NativeUUIDCollectionBuilder ¶ added in v0.2.12
type NativeUUIDCollectionBuilder struct {
// contains filtered or unexported fields
}
func NewNativeUUIDCollectionBuilder ¶ added in v0.2.12
func NewNativeUUIDCollectionBuilder(mongo DB, rw s3.ReadWriter, isBlacklisted blacklist.IsBlacklisted) *NativeUUIDCollectionBuilder
func (*NativeUUIDCollectionBuilder) NewNativeUUIDCollection ¶ added in v0.2.12
func (b *NativeUUIDCollectionBuilder) NewNativeUUIDCollection(ctx context.Context, collection string, skip int) (UUIDCollection, error)
func (*NativeUUIDCollectionBuilder) NewNativeUUIDCollectionForTimeWindow ¶ added in v0.2.12
func (b *NativeUUIDCollectionBuilder) NewNativeUUIDCollectionForTimeWindow(collection string, start time.Time, end time.Time, maximumThrottle time.Duration) (UUIDCollection, error)
type Reader ¶
func NewMongoNativeReader ¶
type TX ¶
type TX interface { ReadNativeContent(collectionId string, uuid string) (*Content, error) FindUUIDsInTimeWindow(collectionId string, start time.Time, end time.Time, batchsize int) (DBIter, int, error) FindUUIDs(collectionId string, skip int, batchsize int) (DBIter, int, error) Ping(ctx context.Context) error Close() }
TX contains database transaction functions
Click to show internal directories.
Click to hide internal directories.