Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Closer ¶
type Closer func() error
Closer is a function that performs cleanup after persistence.
type FieldRetriever ¶
type FieldRetriever interface { // RetrieveField retrieves a single field from persistent storage given the // field retrieval options. If a field doesn't exist for a given type specified // in the options, an error is returned. RetrieveField( namespace []byte, segmentMeta segment.Metadata, field RetrieveFieldOptions, ) (indexfield.DocsField, error) // RetrieveFields retrieves a list of fields from persistent storage given the // field retrieval options. If a field doesn't exist for a given type specified // in the options, an error is returned. RetrieveFields( namespace []byte, segmentMeta segment.Metadata, fields []RetrieveFieldOptions, ) ([]indexfield.DocsField, error) }
FieldRetriever is responsible for retrieving fields from persistent storage. TODO(xichen): Investigate if it's worth providing an async API.
type Fns ¶
type Fns struct {
WriteFields func(fields []indexfield.DocsField) error
}
Fns contains a set of function that persists document IDs and different types of document values for a given field.
type Manager ¶
type Manager interface { // StartPersist starts persisting data. StartPersist() (Persister, error) }
Manager manages the internals of persisting data onto storage layer.
type Persister ¶
type Persister interface { // Prepare prepares for data persistence. Prepare(opts PrepareOptions) (PreparedPersister, error) // Finish marks the persistence as complete. Finish() error // Close all resources owned by the persist manager. Close() error }
Persister is responsible for actually persisting data.
type PrepareOptions ¶
PrepareOptions provide a set of options for data persistence.
type PreparedPersister ¶
PreparedPersister is an object that wraps a persist function and a closer.
type RetrieveFieldOptions ¶
type RetrieveFieldOptions struct { FieldPath []string FieldTypes field.ValueTypeSet }
RetrieveFieldOptions contains the parameters for retrieving a field.